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_cipher_stream_init_dec - start a decryption operation (stream)

Arguments

handle
           [in] cipher handle

       iv
           [in] IV to be used for cipher operation

       iov
           [in] scatter/gather list with data to be encrypted. This is the pointer to the first iov entry if an
           array of iov entries is supplied. See sendmsg(2) for details on how iov is to be used. This pointer
           may be NULL if no data to be encrypted is available at the point of the call.

       iovlen
           [in] number of scatter/gather list elements. If iov is NULL, this value must be zero.

Author

StephanMueller <smueller@chronox.de>
           Author.

Description

       A stream decryption operation is started with this call. Multiple successive kcapi_cipher_stream_update
       function calls can be invoked to send more ciphertext data to be decrypted. The kernel buffers the input
       until kcapi_cipher_stream_op picks up the decrypted data. Once ciphertext is decrypted during the
       kcapi_cipher_stream_op it is removed from the kernel buffer.

       The function calls of kcapi_cipher_stream_update and kcapi_cipher_stream_op can be mixed, even by
       multiple threads of an application.

       The IV buffer must be exactly kcapi_cipher_ivsize bytes in size.

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

Name

       kcapi_cipher_stream_init_dec - start a decryption operation (stream)

Synopsis

ssize_tkcapi_cipher_stream_init_dec(structkcapi_handle*handle,constuint8_t*iv,structiovec*iov,size_tiovlen);

See Also