Set the MAC key bytes on a keygen/paramgen EVP_PKEY_CTX (for example HMAC or Poly1305).
Declared in <openssl/evp.h>
int
EVP_PKEY_CTX_set_mac_key(
EVP_PKEY_CTX* ctx,
unsigned char const* key,
int keylen);
1 on success, or a negative value / 0 on failure.
| Name | Description |
|---|---|
| ctx | Key generation context for a MAC algorithm. |
| key | MAC key octets; may be NULL when keylen is 0. |
| keylen | Length of key in bytes. |