KCAPI_MD_SHA3_512(3)

πŸ’– kcapi_md_sha3_512 β€” the manual page bestie πŸ’–

okay so real quick, this is a page from the libkcapi Manual (section 3, the library-call girlies) and it's all about kcapi_md_sha3_512. sit down, hydrate, let's go 🫢


✨ NAME ✨

kcapi_md_sha3_512 β€” SHA3-512 message digest on one buffer

it's giving "one buffer, one digest, no drama" πŸ’…


🌸 SYNOPSIS 🌸

ssize_t kcapi_md_sha3_512(const uint8_t * in, size_t inlen,
                          uint8_t * out, size_t outlen);

literally one call and you're done, no setup arc, no character development, periodt ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • in β€” [in] the buffer holding your input data. the vibes you're feeding in πŸ’œ
  • inlen β€” [in] how long that input buffer is. count it, don't guess, bestie 🧚
  • out β€” [out] the buffer where the message digest lands. this is where the magic shows up πŸ”₯
  • outlen β€” [in] the length of out. yes she needs to know πŸ™ˆ

πŸ‘‘ DESCRIPTION πŸ‘‘

so this is a one-shot convenience function β€” meaning it does the whole thing in one go, no incremental feeding, no multi-step ceremony. it generates a message digest of the given buffer. slay.

the output buffer must be allocated by the caller (that's you, you're the caller, you got this πŸ’ͺ) and it has to have at least the length of the message digest size for the chosen message digest. no tiny buffers, she will not fit 😭

and here's what she returns:

  • on success β†’ size of message digest πŸŽ‰
  • -EIO β†’ data cannot be obtained. sad. πŸ’€
  • -ENOMEM β†’ buffer is too small for the complete message digest, and in that case the buffer is filled with the truncated message digest. not a full digest, a truncated one. be aware, fr fr ⚠️
ngl the -ENOMEM case is sneaky β€” you don't just get nothing, you get a partial digest in your buffer. check your return values, bestie, that's the whole lesson 🌈

πŸ¦‹ AUTHOR πŸ¦‹

Stephan Mueller <smueller@chronox.de>

  • Author.

iconic of him honestly πŸ‘‘


libkcapi Manual 1.5.0 β€” July 2025

that's the version and the date, straight from the source, no cap. KCAPI_MD_SHA3_512(3) and that's the whole page, hope you ate, mwah πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from