#48284 [NEW]: hash "adler32" byte order is reversed

From: Date: Thu, 14 May 2009 16:20:44 +0000
Subject: #48284 [NEW]: hash "adler32" byte order is reversed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137321@lists.php.net to get a copy of this message
From: tyler dot reese at taqua dot com Operating system: Windows and Linux PHP version: 5.2.9 PHP Bug Type: hash related Bug description: hash "adler32" byte order is reversed Description: ------------ I'm using the "adler32" algorithm of the PHP hash() function. The result that I get has the byte-order reversed from the result I get when doing the same hash on Python. From the Python interpreter: >>> import zlib >>> hex(zlib.adler32('abc',1)) '0x24d0127' I saw that a bug addressed this same thing for the crc32 algorithm, but what about adler32? Reproduce code: --------------- <?php echo hash("adler32","abc"); ?> Expected result: ---------------- 24d0127 Actual result: -------------- 27014d02 -- Edit bug report at http://bugs.php.net/?id=48284&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48284&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48284&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48284&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48284&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48284&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48284&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48284&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48284&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48284&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48284&r=support Expected behavior: http://bugs.php.net/fix.php?id=48284&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48284&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48284&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48284&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48284&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48284&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48284&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48284&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48284&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48284&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48284&r=mysqlcfg

« previous php.bugs (#137321) next »