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

Name

Description

ctx

MAC context previously updated with EVP_MAC_update().

out

Buffer that receives the MAC, or NULL to query the required size via outl.

outl

On success, receives the number of bytes written (or required if out is NULL).

outsize

Size of out in bytes when out is non‐NULL.

Created with MrDocs