Use /dev/urandom, as it doesn't block, which /dev/random might do. Do not

1999-07-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* grand.c (g_rand_new): Use /dev/urandom, as it doesn't block,
	which /dev/random might do. Do not XOR the time, when getting the
	seed form /dev/urandom, as this is good itself. Prevent the
	initial seed from being zero, which causes the PRNG to produce
	only zeros. Hints from Colin Plumb <colin@pgp.com>.
This commit is contained in:
Sebastian Wilhelmi
1999-08-19 08:32:03 +00:00
committed by Sebastian Wilhelmi
parent 80c44ef391
commit e435032d6e
10 changed files with 100 additions and 32 deletions

View File

@@ -1,3 +1,11 @@
1999-07-23 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* grand.c (g_rand_new): Use /dev/urandom, as it doesn't block,
which /dev/random might do. Do not XOR the time, when getting the
seed form /dev/urandom, as this is good itself. Prevent the
initial seed from being zero, which causes the PRNG to produce
only zeros. Hints from Colin Plumb <colin@pgp.com>.
1999-08-17 Tor Lillqvist <tml@iki.fi>
* glib.h (g_trash_stack_push): Add a cast.