KCAPI_MD_SHA1(3)
β¨ KCAPI_MD_SHA1 β¨
okay so bestie, welcome to kcapi_md_sha1 from the libkcapi manual, section 3 (that's the library-functions girlies π
). This is the page for kcapi_md_sha1 β SHA-1 message digest on one buffer. One buffer, one shot, one slay. π
πΈ NAME πΈ
kcapi_md_sha1 β SHA-1 message digest on one buffer
π¦ SYNOPSIS π¦
ssize_t kcapi_md_sha1(const uint8_t * in, size_t inlen, uint8_t * out,
size_t outlen);
π ARGUMENTS π
inβ[in]buffer with input data. like, the stuff you wanna digest, hand it over π«Άinlenβ[in]length of input buffer. how many bytes are we working with, bestieoutβ[out]buffer for message digest. this is where the magic lands β¨outlenβ[in]length ofout. the size of the vessel, no cap
π DESCRIPTION π
So with this one-shot convenience function, a message digest of the given buffer is generated. One call, no drama, no state to babysit, we love a low-maintenance icon. π₯
the output buffer must be allocated by the caller</p> β that's you, bestie, you're the main character here β and it has to have at least the length of the message digest size for the chosen message digest. if it doesn'tβ¦ we'll get to that, and it's giving messy π
and now the return vibe check:
- returns the size of message digest upon success π
-EIOβ data cannot be obtained-ENOMEMβ buffer is too small for the complete message digest, and the buffer is filled with the truncated message digest
heads up fr fr: on -ENOMEM you don't get nothing, you get a truncated digest dropped into your buffer. not the full thing. don't let it fool you π
π AUTHOR π
Stephan Mueller <smueller@chronox.de> β Author. (yes the author, periodt π)
π COPYRIGHT π
that's the whole page bestie, you're officially fluent in kcapi_md_sha1 now, go digest something π¦
libkcapi Manual 1.5.0 Β· July 2025 Β· signing off, mwah π
π¦ 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