PHP 4.0 Bug #6844: Automtic salt for crypt() does not seem to work

From: Date: Fri, 22 Sep 2000 04:57:47 +0000
Subject: PHP 4.0 Bug #6844: Automtic salt for crypt() does not seem to work
Groups: php.dev 
Request: Send a blank email to php-dev+get-33470@lists.php.net to get a copy of this message
From: johanp@aditus.nu Operating system: Linux 2.2.16 PHP version: 4.0.2 PHP Bug Type: mcrypt related Bug description: Automtic salt for crypt() does not seem to work The following demonstrates the problem with automtic salt crypt() function. Note: There is a different behaviour here between 4.0.1pl2 and 4.0.2 not sure what can be considered correct. <?php $orgstr="abc123"; $cryptstr=crypt($orgstr); echo "orgstr=$orgstr, cryptstr=$cryptstr<p>"; echo "Salt length=".CRYPT_SALT_LENGTH."<p>"; ?> This will return the same $cryptstr no matter how many times you call the script. It seems like the automatic salt isn't generated for each call of crypt(). Not sure what the real behavious should be but it's diffrent from 4.0.1pl2 (My machine will use a DES crypt() so that the salt length is 2.)

« previous php.dev (#33470) next »