[#CRYPTO_ccm128_tag]
= CRYPTO&lowbar;ccm128&lowbar;tag
:mrdocs:

Write the computed CCM authentication tag into `tag&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
size&lowbar;t
CRYPTO&lowbar;ccm128&lowbar;tag(
    xref:CCM128_CONTEXT-0c.adoc[CCM128&lowbar;CONTEXT]* ctx,
    unsigned char* tag,
    size&lowbar;t len);
----

== Return Value

Number of tag bytes written (`len),` or 0 if `len` does not match M&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| CCM context after encryption (and optional AAD) processing&period;
| *tag*
| Destination buffer for the tag&semi; `len` must equal the configured M tag length&period;
| *len*
| Number of tag bytes requested (must match the M value from CRYPTO&lowbar;ccm128&lowbar;init())&period;
|===


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