Create an EVP_PKEY holding a MAC key for HMAC, CMAC, Poly1305, or SipHash.
Declared in <openssl/evp.h>
EVP_PKEY*
EVP_PKEY_new_mac_key(
int type,
ENGINE* e,
unsigned char const* key,
int keylen);
Prefer EVP_MAC / EVP_PKEY_new_raw_private_key_ex() for new code.
New EVP_PKEY, or NULL on error.
| Name | Description |
|---|---|
| type | Key type NID (for example EVP_PKEY_HMAC). |
| e | Optional ENGINE implementing the MAC, or NULL. |
| key | Raw key bytes. |
| keylen | Length of key in bytes. |