Scroll to navigation

KCAPI_MD_SHA256(3) Programming Interface KCAPI_MD_SHA256(3)

NAME

kcapi_md_sha256 - SHA-256 message digest on one buffer

SYNOPSIS

ssize_t kcapi_md_sha256(const uint8_t * in, size_t inlen, uint8_t * out, size_t outlen);

ARGUMENTS

in

[in] buffer with input data

inlen

[in] length of input buffer

out

[out] buffer for message digest

outlen

[in] length of out

DESCRIPTION

With this one-shot convenience function, a message digest of the given buffer is generated. The output buffer must be allocated by the caller and have at least the length of the message digest size for the chosen message digest.

return size of message digest upon success; -EIO - data cannot be obtained; -ENOMEM - buffer is too small for the complete message digest, the buffer is filled with the truncated message digest

AUTHOR

Stephan Mueller <smueller@chronox.de>

Author.

COPYRIGHT

March 2023 libkcapi Manual 1.4.0