KCAPI_AEAD_STREAM_OP(3)

✨ KCAPI_AEAD_STREAM_OP ✨

okay bestie, gather round, because today we're talking about kcapi_aead_stream_op from the libkcapi crew β€” it's a section 3 library girlie and she is literally the one who hands you back your processed data. stream edition. πŸ’…


🌸 NAME 🌸

kcapi_aead_stream_op β€” obtain processed data (stream)


πŸ¦‹ SYNOPSIS πŸ¦‹

ssize_t kcapi_aead_stream_op(struct kcapi_handle * handle,
                             struct iovec * iov, size_t iovlen);

πŸŽ€ ARGUMENTS πŸŽ€

  • handle β€” [in] the cipher handle. your main character. the whole vibe depends on her.
  • iov β€” [out] a scatter/gather list pointing at the buffers that are gonna get filled with the resulting data from a cipher operation. so like, she's not reading from these, she's blessing them with output. 🫢
  • iovlen β€” [in] the number of outiov scatter/gather list elements. yes, outiov, that's the actual spelling in the docs, we don't make the rules, we just respect them. πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so here's the tea. this function may cause the caller to sleep 😴 if the kernel buffer holding the data is empty. it's not ghosting you, it's just napping. the process will get woken up once more data shows up β€” and that data arrives by calling kcapi_cipher_stream_update. so basically: no data, no vibes, we wait.

🚨 important note bestie: when you supply buffers that are not a multiple of block size, the buffers will only be filled up to the maximum number of full block sizes that fit into the buffer. she gives you whole blocks only, periodt. the leftover partial block gets left on read. πŸ’€

and the return value, because we love a girl who communicates:

  • on success: the number of bytes obtained from the kernel. slay. ⭐
  • on error: a negative errno-style error code. not slay, but informative. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de> β€” Author.

(we stan a documented legend ✨)


libkcapi Manual 1.5.0, July 2025 β€” and that's the whole copyright section, no cap.


πŸ’Œ sign-off time: this page came to you straight from the libkcapi Manual, version 1.5.0, dated July 2025, filed under KCAPI_AEAD_STREAM_OP(3). read her, love her, call kcapi_cipher_stream_update before you expect anything. bye bestie, go encrypt something iconic πŸ’œπŸ¦‹πŸŽ€
πŸ“¦ where this page comes from