KCAPI_MD_SHA384(3)
β¨ KCAPI_MD_SHA384(3) β¨
okay bestie, welcome to the Programming Interface corner of the libkcapi world β this one is kcapi_md_sha384, and she is serving one-shot SHA-384 realness π
πΈ NAME πΈ
kcapi_md_sha384 β SHA-384 message digest on one buffer
like, one buffer, one call, one gorgeous digest. no drama. π
π¦ SYNOPSIS π¦
ssize_t kcapi_md_sha384(const uint8_t * in, size_t inlen, uint8_t * out,
size_t outlen);
that signature is literally the whole vibe. ssize_t coming back at you, four args, no notes. β¨
π ARGUMENTS π
inβ [in] the buffer holding your input data. this is the tea you're hashing, bestie π«inlenβ [in] how long that input buffer isoutβ [out] the buffer where the message digest landsoutlenβ [in] the length ofout
π DESCRIPTION π
so this is a one-shot convenience function β meaning you hand her a buffer, she generates a message digest of it, and that's it. no state to babysit, no multi-step ceremony. iconic behavior, honestly. π
heads up bestie: the output buffer must be allocated by you, the caller. she's not allocating anything for you, that's not the assignment. and it has to be at least the length of the message digest size for the chosen message digest. so like, size it right. π
now the return value, and listen closely because this part matters fr fr:
- on success, she returns the size of the message digest β¨
-EIOβ data cannot be obtained π-ENOMEMβ the buffer is too small for the complete message digest, and in that case the buffer is filled with the truncated message digest
so yeah, if you see -ENOMEM, you didn't lose everything β you got a lil partial digest situation. but still, size your buffer properly, i'm begging π
π§ AUTHOR π§
Stephan Mueller <smueller@chronox.de> Author.
yes, that's the author line. we love a credited icon π
π COPYRIGHT π
libkcapi Manual 1.5.0 β July 2025 β KCAPI_MD_SHA384(3)
and that's the whole page, bestie. go hash something and slay π β¨π¦
π¦ 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