From: vitor dot reus at gmail dot com Operating system: Windows & Linux PHP version: 5.3.0 PHP Bug Type: *Encryption and hash functions Bug description: Crypt function with distinct behavior in servers
Description: ------------ I have tried to use the crypt function using a 1 char length salt in different servers and the output went different. When I use a 2 char length salt, the output is the same. The architecture of the servers who gave the different output is 32 bits, i think this could be a hint. Reproduce code: --------------- <?php echo CRYPT_STD_DES . CRYPT_EXT_DES . CRYPT_MD5. CRYPT_BLOWFISH."<br>"; echo crypt('1234','Z'); ?> Expected result: ---------------- Linux (several distributions) 64 bits: 1010 Z$pzJXrYhCQNg Actual result: -------------- Windows 32bit: 1010 Z$qZF7.jfwpCE Debian 5 32 bits: 1111 Z$qZF7.jfwpCE -- Edit bug report at http://bugs.php.net/?id=50093&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50093&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50093&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50093&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50093&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50093&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50093&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50093&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50093&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50093&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50093&r=support Expected behavior: http://bugs.php.net/fix.php?id=50093&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50093&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50093&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50093&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50093&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50093&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50093&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50093&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50093&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50093&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50093&r=mysqlcfg