Initialize a MAC context with a key and optional algorithm parameters.
Declared in <openssl/evp.h>
int
EVP_MAC_init(
EVP_MAC_CTX* ctx,
unsigned char const* key,
size_t keylen,
OSSL_PARAM const params[]);
1 on success, or 0 on failure.
| 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. |