'\" t .\" Title: crypto_blkcipher_encrypt .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "CRYPTO_BLKCIPHER_ENC" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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" crypto_blkcipher_encrypt \- encrypt plaintext .SH "SYNOPSIS" .HP \w'int\ crypto_blkcipher_encrypt('u .BI "int crypto_blkcipher_encrypt(struct\ blkcipher_desc\ *\ " "desc" ", struct\ scatterlist\ *\ " "dst" ", struct\ scatterlist\ *\ " "src" ", unsigned\ int\ " "nbytes" ");" .SH "ARGUMENTS" .PP \fIdesc\fR .RS 4 reference to the block cipher handle with meta data .RE .PP \fIdst\fR .RS 4 scatter/gather list that is filled by the cipher operation with the ciphertext .RE .PP \fIsrc\fR .RS 4 scatter/gather list that holds the plaintext .RE .PP \fInbytes\fR .RS 4 number of bytes of the plaintext to encrypt\&. .RE .SH "DESCRIPTION" .PP Encrypt plaintext data using the IV set by the caller with a preceding call of crypto_blkcipher_set_iv\&. .PP The blkcipher_desc data structure must be filled by the caller and can reside on the stack\&. The caller must fill desc as follows: desc\&.tfm is filled with the block cipher handle; desc\&.flags is filled with either CRYPTO_TFM_REQ_MAY_SLEEP or 0\&. .SH "RETURN" .PP 0 if the cipher operation was successful; < 0 if an error occurred .SH "AUTHORS" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .PP \fBMarek Vasut\fR <\&marek@denx.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br