RE: [PHP-DEV] PHP 4.0 Bug #7964: crypt() destroys randomness of rand() ?

From: Date: Fri, 24 Nov 2000 19:50:48 +0000
Subject: RE: [PHP-DEV] PHP 4.0 Bug #7964: crypt() destroys randomness of rand() ?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-39106@lists.php.net to get a copy of this message
Hi Colin, > <PRE><? > > srand ((double) microtime() * 1000000); > > for ($i=0;$i<100;$i++) { > $rand = rand(); > echo $rand; > # try this script with and without the next line commented > # echo ":".crypt($rand); > echo "\n"; > } > > ?></PRE> > > Also, crypt() seems to always use "i3" as a salt. I'm guessing > this is somehow related. I think this has been fixed in CVS. http://bugs.php.net/bugs.php?id=7714 I'm not able to reproduce it on rhl7.0 or freebsd4.0 with latest snapshot. Regards Mike Robinson

« previous php.dev (#39106) next »