[#EVP_MAC_init] = EVP_MAC_init :mrdocs: Initialize a MAC context with a key and optional algorithm parameters. == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int EVP_MAC_init( xref:EVP_MAC_CTX.adoc[EVP_MAC_CTX]* ctx, unsigned char const* key, size_t keylen, xref:OSSL_PARAM.adoc[OSSL_PARAM] const params[]); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | MAC context created with EVP_MAC_CTX_new(). | *key* | MAC key octets. | *keylen* | Length of `key` in bytes. | *params* | Optional OSSL_PARAM array (for example digest selection), or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#