[#CMAC_Init] = CMAC_Init :mrdocs: Initialize a CMAC context with a key and block cipher (deprecated; prefer EVP_MAC). == Synopsis Declared in `<openssl/cmac.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[deprecated]] int CMAC_Init( xref:CMAC_CTX.adoc[CMAC_CTX]* ctx, void const* key, size_t keylen, xref:EVP_CIPHER-07.adoc[EVP_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. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | CMAC context to initialize. | *key* | CMAC key material. | *keylen* | Length of `key` in bytes. | *cipher* | Block cipher implementing CMAC (for example AES‐128‐CBC). | *impl* | Optional ENGINE implementing `cipher,` or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#