[#EVP_MAC_final]
= EVP&lowbar;MAC&lowbar;final
:mrdocs:

Finish a MAC computation and write the authentication tag to a buffer&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;MAC&lowbar;final(
    xref:EVP_MAC_CTX.adoc[EVP&lowbar;MAC&lowbar;CTX]* ctx,
    unsigned char* out,
    size&lowbar;t* outl,
    size&lowbar;t outsize);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| MAC context previously updated with EVP&lowbar;MAC&lowbar;update()&period;
| *out*
| Buffer that receives the MAC, or NULL to query the required size via `outl&period;`
| *outl*
| On success, receives the number of bytes written (or required if `out` is NULL)&period;
| *outsize*
| Size of `out` in bytes when `out` is non&hyphen;NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
