'\" t .\" Title: kcapi_cipher_setkey .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: November 2020 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.2.1 .\" Language: English .\" .TH "KCAPI_CIPHER_SETKEY" "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_setkey \- set the key for the cipher handle .SH "SYNOPSIS" .HP \w'int\ kcapi_cipher_setkey('u .BI "int kcapi_cipher_setkey(struct\ kcapi_handle\ *\ " "handle" ", const\ uint8_t\ *\ " "key" ", uint32_t\ " "keylen" ");" .SH "ARGUMENTS" .PP \fIhandle\fR .RS 4 [in] cipher handle .RE .PP \fIkey\fR .RS 4 [in] key buffer .RE .PP \fIkeylen\fR .RS 4 [in] length of key buffer .RE .SH "DESCRIPTION" .PP With this function, the caller sets the key for subsequent encryption or decryption operations\&. .PP After the caller provided the key, the caller may securely destroy the key as it is now maintained by the kernel\&. .PP \fIreturn\fR 0 upon success (in case of an akcipher handle, a positive integer is returned that denominates the maximum output size of the cryptographic operation \-\- this value must be used as the size of the output buffer for one cryptographic operation); 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