/usr/share/doc/libkcapi/html/API-kcapi-cipher-stream-op.html is in libkcapi-doc 1.0.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>kcapi_cipher_stream_op</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API User Space Interface Library"><link rel="up" href="ch03s06.html" title="Synchronous Symmetric Cipher API - Stream"><link rel="prev" href="API-kcapi-cipher-stream-update.html" title="kcapi_cipher_stream_update"><link rel="next" href="ch03s07.html" title="AEAD Cipher API - Generic"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">kcapi_cipher_stream_op</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-kcapi-cipher-stream-update.html">Prev</a> </td><th width="60%" align="center">Synchronous Symmetric Cipher API - Stream</th><td width="20%" align="right"> <a accesskey="n" href="ch03s07.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-kcapi-cipher-stream-op"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kcapi_cipher_stream_op —
obtain processed data (stream)
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int32_t <b class="fsfunc">kcapi_cipher_stream_op </b>(</code></td><td>struct kcapi_handle * <var class="pdparam">handle</var>, </td></tr><tr><td> </td><td>struct iovec * <var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>uint32_t <var class="pdparam">iovlen</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm1453"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>handle</code></em></span></dt><dd><p>
[in] cipher handle
</p></dd><dt><span class="term"><em class="parameter"><code>iov</code></em></span></dt><dd><p>
[out] scatter/gather list pointing to buffers to be filled with
the resulting data from a cipher operation.
</p></dd><dt><span class="term"><em class="parameter"><code>iovlen</code></em></span></dt><dd><p>
[in] number of scatter/gather list elements.
</p></dd></dl></div></div><div class="refsect1"><a name="idm1471"></a><h2>Description</h2><p>
This call can be called interleaved with <code class="function">kcapi_cipher_stream_update</code> to
fetch the processed data.
</p><p>
This function may cause the caller to sleep if the kernel buffer holding
the data is empty. The process will be woken up once more data is sent
by calling <code class="function">kcapi_cipher_stream_update</code>.
</p><p>
Note, when supplying buffers that are not multiple of block size, the buffers
will only be filled up to the maximum number of full block sizes that fit
into the buffer.
</p><p>
The kernel supports multithreaded applications where one or more threads
send data via the <code class="function">kcapi_cipher_stream_update</code> function and another thread
collects the processed data via kcapi_cipher_stream_op. The kernel, however,
will return data via <code class="function">kcapi_cipher_stream_op</code> as soon as it has some data
available. For example, one thread sends 1000 bytes to be encrypted and
another thread already waits for the ciphertext. The kernel may send only,
say, 500 bytes back to the waiting process during one
<code class="function">kcapi_cipher_stream_op</code> call. In a subsequent calls to
<code class="function">kcapi_cipher_stream_op</code> more ciphertext is returned. This implies that when
the receiving thread shall collect all data there is,
<code class="function">kcapi_cipher_stream_op</code> must be called in a loop until all data is received.
</p><p>
<em class="parameter"><code>return</code></em> number of bytes obtained from the kernel upon success;
a negative errno-style error code if an error occurred
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-kcapi-cipher-stream-update.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03s06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">kcapi_cipher_stream_update</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> AEAD Cipher API - Generic</td></tr></table></div></body></html>
|