mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
grand: Document this is not for cryptographic purposes
While this is obvious to seasoned experts upon inspection, it is really worth documenting explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=710736
This commit is contained in:
parent
856d901569
commit
1e1e2d1ff7
20
glib/grand.c
20
glib/grand.c
@ -65,10 +65,22 @@
|
|||||||
* @short_description: pseudo-random number generator
|
* @short_description: pseudo-random number generator
|
||||||
*
|
*
|
||||||
* The following functions allow you to use a portable, fast and good
|
* The following functions allow you to use a portable, fast and good
|
||||||
* pseudo-random number generator (PRNG). It uses the Mersenne Twister
|
* pseudo-random number generator (PRNG).
|
||||||
* PRNG, which was originally developed by Makoto Matsumoto and Takuji
|
*
|
||||||
* Nishimura. Further information can be found at
|
* <warning><para>Do not use this API for cryptographic purposes such as key
|
||||||
* <ulink url="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html">
|
* generation, nonces, salts or one-time pads.</para></warning>
|
||||||
|
*
|
||||||
|
* This PRNG is suitable for non-cryptographic use such as in games
|
||||||
|
* (shuffling a card deck, generating levels), generating data for a
|
||||||
|
* test suite, etc. If you need random data for cryptographic
|
||||||
|
* purposes, it is recommended to use platform-specific APIs such as
|
||||||
|
* <literal>/dev/random</literal> on Unix, or CryptGenRandom() on
|
||||||
|
* Windows.
|
||||||
|
*
|
||||||
|
* GRand uses the Mersenne Twister PRNG, which was originally
|
||||||
|
* developed by Makoto Matsumoto and Takuji Nishimura. Further
|
||||||
|
* information can be found at <ulink
|
||||||
|
* url="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html">
|
||||||
* http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html</ulink>.
|
* http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html</ulink>.
|
||||||
*
|
*
|
||||||
* If you just need a random number, you simply call the
|
* If you just need a random number, you simply call the
|
||||||
|
Loading…
Reference in New Issue
Block a user