EVP_Q_digest

One-shot digest of data using a fetched algorithm name.

Synopsis

Declared in <openssl/evp.h>

int
EVP_Q_digest(
    OSSL_LIB_CTX* libctx,
    char const* name,
    char const* propq,
    void const* data,
    size_t datalen,
    unsigned char* md,
    size_t* mdlen);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
libctxLibrary context for the fetch, or NULL for the default.
nameDigest algorithm name (for example "SHA256").
propqProperty query for the fetch, or NULL.
dataBytes to hash.
datalenNumber of bytes at data.
mdOutput buffer for the digest (at least the algorithm size).
mdlenOptional in/out length of md; updated to the digest size.