EVP_Digest

Hash count bytes at data in one shot and write the digest to md.

Synopsis

Declared in <openssl/evp.h>

int
EVP_Digest(
    void const* data,
    size_t count,
    unsigned char* md,
    unsigned int* size,
    EVP_MD const* type,
    ENGINE* impl);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
dataInput bytes to hash.
countNumber of bytes at data.
mdOutput buffer for the digest; at most EVP_MAX_MD_SIZE bytes are written.
sizeOptional destination for the digest length in bytes, or NULL.
typeDigest algorithm to use.
implOptional ENGINE providing type, or NULL for the default implementation.