KCAPI_MD_SHA3_224(3)
π KCAPI_MD_SHA3_224 β it's giving "one buffer, one digest, zero drama" β¨
okay bestie, so this is the kcapi_md_sha3_224 page from the libkcapi manual (that's the Programming Interface section, iykyk) and it's literally the cutest lil one-shot hash function you ever met. no state machines, no ceremony, just buffer in β SHA3-224 digest out. slay. π
π NAME π
kcapi_md_sha3_224 β SHA3-224 message digest on one buffer
like, one buffer. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
ssize_t kcapi_md_sha3_224(const uint8_t * in, size_t inlen,
uint8_t * out, size_t outlen);
she takes four args and returns an ssize_t, no cap. π
πΈ ARGUMENTS πΈ
inβ [in] the buffer holding your input data. the raw material, the moment, the β¨contentβ¨.inlenβ [in] how long that input buffer is. tell her the truth, don't be shy.outβ [out] the buffer where the message digest lands. this is where the magic gets written, bestie.outlenβ [in] the length ofout. you gotta declare it upfront, no surprises. π
π DESCRIPTION π
so with this one-shot convenience function, a message digest of the given buffer gets generated. that's it, that's the whole function. one call, one digest, main character energy only. π«
the important bit tho: the output buffer must be allocated by the caller, and it has to have at least the length of the message digest size for the chosen message digest. translation: you bring the buffer, and you bring it big enough. not me showing up with a tiny buffer and expecting a full digest π that's not how this works.
and here's the return tea, fr fr:
- β size of message digest β upon success. we ate.
- π
-EIOβ data cannot be obtained. the data said "no thanks." - π
-ENOMEMβ the buffer is too small for the complete message digest, and the buffer is filled with the truncated message digest. so like, you get a partial. a lil baby digest. still useful, still real, just not the whole thing.
no cap: if you're getting-ENOMEM, youroutbuffer was too small and what you got back is a truncated digest. size your buffer for the full digest size of the chosen message digest and you're golden. π
π AUTHOR π
Stephan Mueller <smueller@chronox.de> β Author. (the icon behind all of this, we stan π«Ά)
π COPYRIGHT π
that's the whole page bestie, go forth and hash responsibly π
libkcapi Manual 1.5.0 β July 2025 π¦ mwah, that's the version and the date, documented and adorable. periodt. πβ¨
π¦ 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