CMAC_Init

Initialize a CMAC context with a key and block cipher (deprecated; prefer EVP_MAC).

Synopsis

Declared in <openssl/cmac.h>

[[deprecated]]
int
CMAC_Init(
    CMAC_CTX* ctx,
    void const* key,
    size_t keylen,
    EVP_CIPHER const* cipher,
    ENGINE* impl);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCMAC context to initialize.
keyCMAC key material.
keylenLength of key in bytes.
cipherBlock cipher implementing CMAC (for example AES-128-CBC).
implOptional ENGINE implementing cipher, or NULL.