KCAPI_AEAD_OUTBUFLEN(3)

πŸ’– NAME πŸ’–

kcapi_aead_outbuflen_dec β€” bestie, this one tells you the minimum size your decryption output buffer needs to be. no cap, that's the whole job πŸŽ€


✨ SYNOPSIS ✨

size_t kcapi_aead_outbuflen_dec(struct kcapi_handle * handle,
                                size_t inlen, size_t assoclen,
                                size_t taglen);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] the cipher handle, aka your little crypto bestie you've been passing around
  • inlen β€” [in] size of the ciphertext, so like, how many bytes of secret soup you're feeding in
  • assoclen β€” [in] size of the associated data (AD) β€” yes that AD, the extra authenticated-but-not-encrypted bit 🫢
  • taglen β€” [in] size of the authentication tag, the little seal that says "yep this is legit"

🌸 DESCRIPTION 🌸

okay so basically: this function returns the minimum size of output data length, in bytes πŸ’…

like, it's giving "how much room do I need to malloc for my plaintext" energy. ask it before you allocate, don't be out here guessing, fr fr ✨


πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de>

β€” Author. we stan. πŸ™Œ


this is from the libkcapi Manual 1.5.0, dated July 2025 🫢

that's it, that's the page β€” go allocate responsibly bestie, and remember: check your buffer length before you write to it πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from