Set the OCB IV / nonce and authentication tag length for an operation.

Synopsis

Declared in <openssl/modes.h>

int
CRYPTO_ocb128_setiv(
    OCB128_CONTEXT* ctx,
    unsigned char const* iv,
    size_t len,
    size_t taglen);

Return Value

1 on success, or ‐1 if len or taglen is out of range.

Parameters

Name

Description

ctx

OCB context from CRYPTO_ocb128_new() or CRYPTO_ocb128_init().

iv

Nonce octets (1–15 bytes).

len

Length of iv in bytes.

taglen

Desired tag length in bytes (1–16).

Created with MrDocs