CRYPTO_ocb128_finish

Finalise OCB and verify a received authentication tag.

Synopsis

Declared in <openssl/modes.h>

int
CRYPTO_ocb128_finish(
    OCB128_CONTEXT* ctx,
    unsigned char const* tag,
    size_t len);

Return Value

0 if tag matches, a non-zero value if it does not, or -1 if len is invalid.

Parameters

NameDescription
ctxOCB context after encrypt/decrypt (and AAD) processing.
tagExpected authentication tag to compare.
lenLength of tag in bytes (1–16).