KCAPI_MD_SHA512(3)
π KCAPI_MD_SHA512(3) β the manual page, but make it make sense π
okay bestie, welcome to kcapi_md_sha512, straight out of the libkcapi programming interface. it's section 3, it's a one-shot, and it's about to hash a whole buffer in one single call. no streaming, no state machine, no drama. just vibes and SHA-512. β¨
πΈ NAME πΈ
kcapi_md_sha512 β SHA-512 message digest on one buffer
likeβ¦ that's it. that's the whole job. one buffer in, SHA-512 digest out. π
π SYNOPSIS π
ssize_t kcapi_md_sha512(const uint8_t * in, size_t inlen, uint8_t * out,
size_t outlen);
π¦ ARGUMENTS π¦
inβ [in] the buffer holding your input data. this is the stuff getting digested, bestie.inlenβ [in] how long that input buffer is. length ofin, periodt.outβ [out] the buffer where the message digest lands. you're getting something back, iconic.outlenβ [in] the length ofout. how much room you gave it.
β¨ DESCRIPTION β¨
so this is a one-shot convenience function, and honestly? obsessed. it generates a message digest of the buffer you hand it, in one go. no setup arc, no character development, just digest.
the catch (and there's always a catch, lowkey): the output buffer is your responsibility. the caller allocates it, and it has to be at least as long as the message digest size for whichever message digest you chose. no shortcuts on the allocation, fr fr. π«Ά
now the return situation, listen carefully:
- returns the size of the message digest on success π
-EIOβ data cannot be obtained π-ENOMEMβ the buffer is too small for the complete message digest, and the buffer gets filled with the truncated message digest
heads up bestie: that -ENOMEM case is sneaky. you don't just get an error β you get a partial digest sitting in your buffer. truncated. not the whole thing. don't be out here treating it like a full digest, i'm begging. π
π AUTHOR π
Stephan Mueller <smueller@chronox.de>
- Author.
the actual main character of this manpage, ngl. π
π COPYRIGHT π
this is the libkcapi Manual, version 1.5.0, dated July 2025. π¦
and that's the whole page, bestie β kcapi_md_sha512(3), libkcapi Manual 1.5.0, July 2025, SHA-512, one buffer, zero notes. go forth and digest 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