PHP 4.0 Bug #8080 Updated: crypt() does not generate random salts
| From: | sniper@php.net | Date: | Sun, 03 Dec 2000 05:00:38 +0000 |
| Subject: | PHP 4.0 Bug #8080 Updated: crypt() does not generate random salts | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39892@lists.php.net to get a copy of this message | ||
ID: 8080
Updated by: sniper
Reported By: joel.jacobson@mobigym.se
Status: Closed
Bug Type: Unknown/Other Function
Assigned To:
Comments:
This is fixed in CVS.
Please try this: http://www.php.net/distributions/php-4.0.4RC3.tar.gz
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-12-02 20:37:21] joel.jacobson@mobigym.se
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)
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8080