PHP 4.0 Bug #7964: crypt() destroys randomness of rand() ?

From: Date: Fri, 24 Nov 2000 17:02:08 +0000
Subject: PHP 4.0 Bug #7964: crypt() destroys randomness of rand() ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-39103@lists.php.net to get a copy of this message
From: colin@easydns.com Operating system: RH6.2 PHP version: 4.0.3pl1 PHP Bug Type: Math related Bug description: crypt() destroys randomness of rand() ? <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. - Colin -- Edit Bug report at: http://bugs.php.net/?id=7964&edit=1

« previous php.dev (#39103) next »