ID:               48284
 Updated by:       [email protected]
 Reported By:      tyler dot reese at taqua dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         hash related
 Operating System: Windows and Linux
 PHP Version:      5.2.9
-Assigned To:      
+Assigned To:      scottmac


Previous Comments:
------------------------------------------------------------------------

[2009-05-14 16:20:44] tyler dot reese at taqua dot com

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 this bug report at http://bugs.php.net/?id=48284&edit=1

Reply via email to