KCAPI_MD_HMAC_SHA1(3)
π NAME π
kcapi_md_hmac_sha1 β HMAC SHA-1 keyed message digest on one buffer
okay bestie, this is the one-shot girlie: you hand her a key and a buffer, she hands you back a message digest. no state, no drama, no setup, just vibes and HMAC. β¨
π¦ SYNOPSIS π¦
ssize_t kcapi_md_hmac_sha1(const uint8_t * key, uint32_t keylen,
const uint8_t * in, size_t inlen,
uint8_t * out, size_t outlen);
π ARGUMENTS π
keyβ[in]the buffer holding your HMAC key πkeylenβ[in]how long that HMAC key buffer isinβ[in]the buffer with your input data (the actual tea β)inlenβ[in]length of the input bufferoutβ[out]the buffer where the message digest goes πoutlenβ[in]length ofout
πΈ DESCRIPTION πΈ
So this is the one-shot convenience function β literally the "I don't have time for a whole init/update/final situation" option. It generates a keyed message digest of the given buffer, all in one go. Slay. π
Heads up bestie: the output buffer is yours to allocate. The caller allocates it, and it has to be at least the length of the message digest size for whichever keyed message digest you picked. Not smaller. Don't do it. π
And here's the tea on what she gives back β:
- size of message digest upon success π₯³
-EIOβ data cannot be obtained-ENOMEMβ buffer is too small for the complete message digest, and in that case the buffer is filled with the truncated message digest π
π AUTHOR π
Stephan Mueller <smueller@chronox.de>
Author. yes that's the whole credit line, and honestly? icon behavior. π«Ά
π COPYRIGHT π
libkcapi Manual 1.5.0 β July 2025 π
and that's the whole page bestie, no cap. go forth and HMAC responsibly π§β¨π
π¦ where this page comes from
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms