[#CMAC_Init]
= CMAC&lowbar;Init
:mrdocs:

Initialize a CMAC context with a key and block cipher (deprecated&semi; prefer EVP&lowbar;MAC)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
CMAC&lowbar;Init(
    xref:CMAC_CTX.adoc[CMAC&lowbar;CTX]* ctx,
    void const* key,
    size&lowbar;t keylen,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* cipher,
    xref:ENGINE.adoc[ENGINE]* impl);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| CMAC context to initialize&period;
| *key*
| CMAC key material&period;
| *keylen*
| Length of `key` in bytes&period;
| *cipher*
| Block cipher implementing CMAC (for example AES&hyphen;128&hyphen;CBC)&period;
| *impl*
| Optional ENGINE implementing `cipher,` or NULL&period;
|===


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