HMAC_Init

Initialize an HMAC context with a key and digest (legacy).

Synopsis

Declared in <openssl/hmac.h>

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

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
ctxHMAC context to initialize.
keyHMAC key material.
lenLength of key in bytes.
mdMessage digest to use, or NULL to keep the current digest.