[PHP-DEV] PHP 4.0 Bug #8080: crypt() does not generate random salts From: joel.jacobson <email protected>
Date: 12/02/00

From: joel.jacobson <email protected>
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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>