ID:               48284
 Updated by:       scott...@php.net
 Reported By:      tyler dot reese at taqua dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         hash related
 Operating System: *
 PHP Version:      5.2.9
 Assigned To:      scottmac
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2009-08-12 00:18:37] s...@php.net

Automatic comment from SVN on behalf of scottmac
Revision: http://svn.php.net/viewvc/?view=revision&revision=287127
Log: MFB 5.3: Fix bug #48284 (r283144) - adler32 is in the wrong order.
Changed to match what zlib produces.

------------------------------------------------------------------------

[2009-06-30 13:23:47] scott...@php.net

Fixed in trunk and for 5.3.1, will do 5.2 shortly.

------------------------------------------------------------------------

[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