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

From: Date: Mon, 27 Nov 2000 09:09:45 +0000
Subject: PHP 4.0 Bug #7964 Updated: crypt() destroys randomness of rand() ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-39202@lists.php.net to get a copy of this message
ID: 7964 Updated by: sniper Reported By: colin@easydns.com Status: Closed Bug Type: Math related Assigned To: Comments: Fixed in CVS already. Reopen this bug report if problem still exists using latest snapshot from http://snaps.php.net/ --Jani Previous Comments: --------------------------------------------------------------------------- [2000-11-24 12:02:08] colin@easydns.com <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 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7964

« previous php.dev (#39202) next »