EVP_MAC_final

Finish a MAC computation and write the authentication tag to a buffer.

Synopsis

Declared in <openssl/evp.h>

int
EVP_MAC_final(
    EVP_MAC_CTX* ctx,
    unsigned char* out,
    size_t* outl,
    size_t outsize);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
ctxMAC context previously updated with EVP_MAC_update().
outBuffer that receives the MAC, or NULL to query the required size via outl.
outlOn success, receives the number of bytes written (or required if out is NULL).
outsizeSize of out in bytes when out is non-NULL.