note 101846 rejected from function.crypt by danbrown

From: Date: Fri, 14 Jan 2011 01:32:18 +0000
Subject: note 101846 rejected from function.crypt by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-175730@lists.php.net to get a copy of this message
Note Submitter: daniel dot macdonald at designory dot com ---- In PHP 5.3.1, I am running into trouble with crypt() and numeric strings: code: $salt = '$1$abcdefgh$'; $pass = "123"; $pass2 = "123a"; echo crypt($pass, $salt)."<br />\n"; echo crypt($pass, $salt)."<br />\n"; echo crypt($pass2, $salt)."<br />\n"; echo crypt($pass2, $salt)."<br />\n"; output: $1$abcdefgh$OTo2MhKVLtpE9bkEycLQf0 $1$abcdefgh$JwVLNLvq4bwIKuyv1qm8L0 $1$abcdefgh$PiPnB9KJsYjPIXtoia0WK/ $1$abcdefgh$PiPnB9KJsYjPIXtoia0WK/ the results of the alphanumeric string are expected, but the numeric only string returns a different result each time crypt() is called. I am at a loss.

« previous php.notes (#175730) next »