'\" t .\" Title: crypto_alloc_rng .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: April 2019 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.9.168 .\" Language: English .\" .TH "CRYPTO_ALLOC_RNG" "9" "April 2019" "Kernel Hackers Manual 4\&.9\&." "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_alloc_rng \- \- allocate RNG handle .SH "SYNOPSIS" .HP \w'struct\ crypto_rng\ *\ crypto_alloc_rng('u .BI "struct crypto_rng * crypto_alloc_rng(const\ char\ *\ " "alg_name" ", u32\ " "type" ", u32\ " "mask" ");" .SH "ARGUMENTS" .PP \fIalg_name\fR .RS 4 is the cra_name / name or cra_driver_name / driver name of the message digest cipher .RE .PP \fItype\fR .RS 4 specifies the type of the cipher .RE .PP \fImask\fR .RS 4 specifies the mask for the cipher .RE .SH "DESCRIPTION" .PP Allocate a cipher handle for a random number generator\&. The returned struct crypto_rng is the cipher handle that is required for any subsequent API invocation for that random number generator\&. .PP For all random number generators, this call creates a new private copy of the random number generator that does not share a state with other instances\&. The only exception is the \(lqkrng\(rq random number generator which is a kernel crypto API use case for the \fBget_random_bytes\fR function of the /dev/random driver\&. .SH "RETURN" .PP allocated cipher handle in case of success; \fBIS_ERR\fR is true in case of an error, \fBPTR_ERR\fR returns the error code\&. .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