SHA1

Compute the SHA-1 digest of n bytes at d in one shot.

Synopsis

Declared in <openssl/sha.h>

unsigned char*
SHA1(
    unsigned char const* d,
    size_t n,
    unsigned char* md);

Return Value

Pointer to the digest bytes (md, or the static buffer when md is NULL), or NULL on error.

Parameters

NameDescription
dInput message bytes.
nNumber of bytes at d.
mdOutput buffer of at least SHA_DIGEST_LENGTH bytes, or NULL to use a static buffer (not thread-safe).