KCAPI_MD_SHA3_256(3)

πŸ’– KCAPI_MD_SHA3_256 β€” the manual page, bestie edition πŸ’–

okay so this is KCAPI_MD_SHA3_256(3), section 3, and it's literally one of the most chill functions in the whole libkcapi lineup. no cap.


✨ NAME ✨

kcapi_md_sha3_256 β€” SHA3-256 message digest on one buffer πŸŽ€

like. one buffer. one digest. one function call. it's giving low-effort-high-reward and we're obsessed.


✨ SYNOPSIS ✨

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

✨ ARGUMENTS ✨

  • in β€” [in] the buffer holding your input data 🫢 hand it over, bestie
  • inlen β€” [in] how long that input buffer is
  • out β€” [out] the buffer where the message digest gets written πŸ’… you're providing this one
  • outlen β€” [in] the length of out

✨ DESCRIPTION ✨

so with this one-shot convenience function, a message digest of the given buffer gets generated. that's it. that's the whole vibe. πŸ¦‹

the output buffer? you allocate it, bestie, not the library. and it has to be at least the length of the message digest size for the chosen message digest. if it's not... well, we'll get to that. 😭

what it returns:

  • the size of the message digest upon success ✨ (slay)
  • -EIO β€” data cannot be obtained πŸ˜”
  • -ENOMEM β€” the buffer is too small for the complete message digest, and heads up: the buffer gets filled with the truncated message digest
so like, -ENOMEM isn't a total wipeout here β€” you still get something in your buffer, just the truncated version of the digest. but also... girl, size your buffer right the first time. πŸ’€

✨ AUTHOR ✨

Stephan Mueller <smueller@chronox.de>

  • Author.

periodt. the icon who wrote this. πŸ‘‘


that's the whole page, bestie, hope it ate 🌈

this was the libkcapi Manual version 1.5.0, from July 2025 β€” go forth and hash responsibly, ily πŸ’œπŸ§š

KCAPI_MD_SHA3_256(3) β€” Programming Interface 🌸

πŸ“¦ where this page comes from