'\" t .\" Title: struct rng_alg .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRUCT RNG_ALG" "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" struct_rng_alg \- random number generator definition .SH "SYNOPSIS" .sp .nf struct rng_alg { int (* generate) (struct crypto_rng *tfm,const u8 *src, unsigned int slen,u8 *dst, unsigned int dlen); int (* seed) (struct crypto_rng *tfm, const u8 *seed, unsigned int slen); void (* set_ent) (struct crypto_rng *tfm, const u8 *data,unsigned int len); unsigned int seedsize; struct crypto_alg base; }; .fi .SH "MEMBERS" .PP generate .RS 4 The function defined by this variable obtains a random number\&. The random number generator transform must generate the random number out of the context provided with this call, plus any additional data if provided to the call\&. .RE .PP seed .RS 4 Seed or reseed the random number generator\&. With the invocation of this function call, the random number generator shall become ready for generation\&. If the random number generator requires a seed for setting up a new state, the seed must be provided by the consumer while invoking this function\&. The required size of the seed is defined with \fIseedsize\fR \&. .RE .PP set_ent .RS 4 Set entropy that would otherwise be obtained from entropy source\&. Internal use only\&. .RE .PP seedsize .RS 4 The seed size required for a random number generator initialization defined with this variable\&. Some random number generators does not require a seed as the seeding is implemented internally without the need of support by the consumer\&. In this case, the seed size is set to zero\&. .RE .PP base .RS 4 Common crypto API algorithm data structure\&. .RE .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