HMAC_Init_ex

(Re)initialize an HMAC_CTX with key and digest (deprecated; prefer EVP_MAC).

Synopsis

Declared in <openssl/hmac.h>

[[deprecated]]
int
HMAC_Init_ex(
    HMAC_CTX* ctx,
    void const* key,
    int len,
    EVP_MD const* md,
    ENGINE* impl);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxHMAC context to initialize.
keyHMAC key bytes, or NULL to reuse the previous key when only md changes.
lenLength of key in bytes (ignored when key is NULL).
mdMessage digest used as the HMAC hash, or NULL to keep the previous digest.
implOptional ENGINE implementing md, or NULL.