KCAPI_CIPHER_STREAM_(3) | Programming Interface | KCAPI_CIPHER_STREAM_(3) |
kcapi_cipher_stream_init_enc - start an encryption operation (stream)
ssize_t kcapi_cipher_stream_init_enc(struct kcapi_handle * handle, const uint8_t * iv, struct iovec * iov, size_t iovlen);
handle
iv
iov
iovlen
A stream encryption operation is started with this call. Multiple successive kcapi_cipher_stream_update function calls can be invoked to send more plaintext data to be encrypted. The kernel buffers the input until kcapi_cipher_stream_op picks up the encrypted data. Once plaintext is encrypted 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
Stephan Mueller <smueller@chronox.de>
February 2022 | libkcapi Manual 1.4.0 |