'\" t .\" Title: kcapi_cipher_stream_update_last .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: November 2020 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.2.1 .\" Language: English .\" .TH "KCAPI_CIPHER_STREAM_" "3" "November 2020" "libkcapi Manual 1\&.2\&.1" "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kcapi_cipher_stream_update_last \- send last data for processing (stream) .SH "SYNOPSIS" .HP \w'int32_t\ kcapi_cipher_stream_update_last('u .BI "int32_t kcapi_cipher_stream_update_last(struct\ kcapi_handle\ *\ " "handle" ", struct\ iovec\ *\ " "iov" ", uint32_t\ " "iovlen" ");" .SH "ARGUMENTS" .PP \fIhandle\fR .RS 4 [in] cipher handle .RE .PP \fIiov\fR .RS 4 [in] scatter/gather list with data to be processed by the cipher operation\&. .RE .PP \fIiovlen\fR .RS 4 [in] number of scatter/gather list elements\&. .RE .SH "DESCRIPTION" .PP Using this function call, more plaintext for encryption or ciphertext for decryption can be submitted to the kernel\&. .PP This call is identical to the \fBkcapi_cipher_stream_update\fR call with the exception that it marks the last data buffer before the cipher operation is triggered\&. This is call is important for stream ciphers like CTR or CTS mode when providing the last block\&. It is permissible to provide a zero buffer if all data including the last block is already provided by kcapi_cipher_stream_update\&. .SH "WARNING" .PP If this call is not made for stream ciphers with input data that is not a multiple of the block size of the block cipher, the kernel will not return the last block that contains less data than the block size of the block cipher\&. For example, sending 257 bytes of data to be encrypted with ctr(aes), the kernel will return only 256 bytes without this call\&. .PP \fIreturn\fR number of bytes sent to the kernel upon success; a negative errno\-style error code if an error occurred .SH "AUTHOR" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br