CRYPTO_ocb128_setiv

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

NameDescription
ctxOCB context from CRYPTO_ocb128_new() or CRYPTO_ocb128_init().
ivNonce octets (1–15 bytes).
lenLength of iv in bytes.
taglenDesired tag length in bytes (1–16).