[#EVP_PKEY_new_mac_key] = EVP_PKEY_new_mac_key :mrdocs: Create an EVP_PKEY holding a MAC key for HMAC, CMAC, Poly1305, or SipHash. == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:EVP_PKEY.adoc[EVP_PKEY]* EVP_PKEY_new_mac_key( int type, xref:ENGINE.adoc[ENGINE]* e, unsigned char const* key, int keylen); ---- == Description Prefer EVP_MAC / EVP_PKEY_new_raw_private_key_ex() for new code. == Return Value New EVP_PKEY, or NULL on error. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#