EVP_DigestInit_ex2

Initialize a digest context with type and optional algorithm parameters.

Synopsis

Declared in <openssl/evp.h>

int
EVP_DigestInit_ex2(
    EVP_MD_CTX* ctx,
    EVP_MD const* type,
    OSSL_PARAM const params[]);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxDigest context to (re)initialize; must have been created with EVP_MD_CTX_new().
typeDigest algorithm, or NULL to reuse the algorithm already associated with ctx.
paramsOptional OSSL_PARAM array applied to the digest (terminated by OSSL_PARAM_END), or NULL.