logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

kcapi_aead_stream_update - send more data for processing (stream)

Arguments

handle
           [in] cipher handle

       iov
           [in] scatter/gather list with data to be processed by the cipher operation.

       iovlen
           [in] number of scatter/gather list elements.

Author

StephanMueller <smueller@chronox.de>
           Author.

Description

       Using this function call, more plaintext for encryption or ciphertext for decryption can be submitted to
       the kernel.

       Note, see the order of input data as outlined in kcapi_aead_stream_init_dec.

       This function may cause the caller to sleep if the kernel buffer holding the data is getting full. The
       process will be woken up once more buffer space becomes available by calling kcapi_aead_stream_op.

Name

       kcapi_aead_stream_update - send more data for processing (stream)

Note

       The last block of input data MUST be provided with kcapi_aead_stream_update_last as the kernel must be
       informed about the completion of the input data.

       With the separate API calls of kcapi_aead_stream_update and kcapi_aead_stream_op a multi-threaded
       application can be implemented where one thread sends data to be processed and one thread picks up data
       processed by the cipher operation.

Synopsis

ssize_tkcapi_aead_stream_update(structkcapi_handle*handle,structiovec*iov,size_tiovlen);

Warning

       The memory referenced by iov is not accessed by the kernel during this call. The memory is first accessed
       when kcapi_cipher_stream_op is called. Thus, you MUST make sure that the referenced memory is still
       present at the time kcapi_cipher_stream_op is called.

       return number of bytes sent to the kernel upon success; a negative errno-style error code if an error
       occurred

See Also