Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GENRANDOM(3)		   Library Functions Manual		  GENRANDOM(3)

NAME
       genrandom, prng - random	number generation

SYNOPSIS
       #include	<u.h>
       #include	<libc.h>
       #include	<mp.h>
       #include	<libsec.h>

       void genrandom(uchar *buf, int nbytes)

       void prng(uchar *buf, int nbytes)

DESCRIPTION
       Most  security  software	 requires  a  source of	random or, at the very
       least, unguessable numbers.

       Genrandom fills a buffer	with bytes from	the X9.17 pseudo-random	number
       generator.  The X9.17 generator is seeded by 24 truly random bytes read
       via truerand (see

       Prng uses the native pseudo-random number generator to fill the buffer.
       Used  with  srand,  this	 function can produce a	reproducible stream of
       pseudo random numbers useful in testing.

       Both functions may be passed to mprand (see

SOURCE
       /src/libsec

SEE ALSO
								  GENRANDOM(3)

NAME | SYNOPSIS | DESCRIPTION | SOURCE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=genrandom&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help