Random number generator (device): Difference between revisions

m
Regularize non-standard header markup
m (→‎{{header|Phix}}: tested on 0.8.2 (not that my cpu has magically gotten rdrand))
m (Regularize non-standard header markup)
Line 355:
}</lang>
 
=== {{libheader|BSD libc}} ===
[http://www.openbsd.org/cgi-bin/man.cgi?query=arc4random&apropos=0&sektion=3&manpath=OpenBSD+Current&arch=i386&format=html arc4random()] appeared in [[OpenBSD]] 2.1 and has spread to many [[BSD]] systems. This function runs an ARC4 random number generator that takes entropy from a kernel device. (This kernel device is sysctl kern.arandom in OpenBSD, or /dev/urandom in some other systems.)
 
Line 369:
}</lang>
 
=== {{libheader|OpenSSL}} ===
OpenSSL can generate random numbers. The default generator uses SHA1. For [[Unix]] systems, OpenSSL will gather entropy by reading a kernel device like /dev/urandom, or by using [http://egd.sourceforge.net/ EGD, the Entropy Gathering Daemon]. For other systems, OpenSSL might use a different source of entropy.
 
Line 418:
}</lang>
 
== {{header|C++}} ==
<code>std::random_device</code> is a uniformly-distributed integer random number generator that produces non-deterministic random numbers.
 
Line 481:
}</lang>
 
== {{header|ChucK}} ==
<lang c> Math.random2(-(Math.random()),Math.random(); </lang>
 
10,333

edits