PHP 4.0 Bug #6812 Updated: crypt() function does not honour salt. Always return the same value.
| From: | Bug Database | Date: | Thu, 21 Sep 2000 12:11:08 +0000 |
| Subject: | PHP 4.0 Bug #6812 Updated: crypt() function does not honour salt. Always return the same value. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33597@lists.php.net to get a copy of this message | ||
ID: 6812
Updated by: sniper
Reported By: johanp@aditus.nu
Status: Closed
Bug Type: mcrypt related
Assigned To:
Comments:
Please read http://www.php.net/manual/function.crypt.php
again.
The salt string can be only 2-characters.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-09-20 08:21:58] johanp@aditus.nu
The following test demostrates the problem with crypt() function.
<?php
$orgstr="abc123";
$salt=time();
$cryptstr=crypt($orgstr,$salt);
echo "orgstr=$orgstr, salt=$salt, cryptstr=$cryptstr<p>";
?>
This will return the same $cryptstr whatever the salt is.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6812