KCAPI_MD_HMAC_SHA512(3) | Programming Interface | KCAPI_MD_HMAC_SHA512(3) |
kcapi_md_hmac_sha512 - HMAC SHA-512 keyed message digest on one buffer
ssize_t kcapi_md_hmac_sha512(const uint8_t * key, uint32_t keylen, const uint8_t * in, size_t inlen, uint8_t * out, size_t outlen);
key
keylen
in
inlen
out
outlen
With this one-shot convenience function, a keyed 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 keyed 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
Stephan Mueller <smueller@chronox.de>
February 2022 | libkcapi Manual 1.4.0 |