PHP 4.0 Bug #8080: crypt() does not generate random salts

From: Date: Sun, 03 Dec 2000 01:37:21 +0000
Subject: PHP 4.0 Bug #8080: crypt() does not generate random salts
Groups: php.dev 
Request: Send a blank email to php-dev+get-39879@lists.php.net to get a copy of this message
From: joel.jacobson@mobigym.se Operating system: Linux 2.4.0-test11 PHP version: 4.0.3pl1 PHP Bug Type: Unknown/Other Function Bug description: crypt() does not generate random salts When I use the crypt() function to generate hashes the salts are not randomly generated. An example: #/usr/local/bin/php <?php print crypt("salt")."\n"; print crypt("thesame")."\n"; print crypt("again")."\n"; ?> Output: i3lCe7C6q27tM i3vw3zP1zAXbk i3DLFUqiVZx.U (Adding srand ((double) microtime() * 1000000); in the beginning didn't help) -- Edit Bug report at: http://bugs.php.net/?id=8080&edit=1

« previous php.dev (#39879) next »