KCAPI_MD_DIGEST(3) | Programming Interface | KCAPI_MD_DIGEST(3) |
NAME¶
kcapi_md_digest - calculate message digest on buffer (one-shot)
SYNOPSIS¶
ssize_t kcapi_md_digest(struct kcapi_handle * handle, const uint8_t * in, size_t inlen, uint8_t * out, size_t outlen);
ARGUMENTS¶
handle
in
inlen
out
outlen
DESCRIPTION¶
With this one-shot 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.
The message digest handle must have been initialized, potentially by also setting the key using the generic message digest API functions.
The input buffer can be at most INT_MAX in size.
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>
COPYRIGHT¶
March 2023 | libkcapi Manual 1.4.0 |