|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48284 hash "adler32" byte order is reversed
Submitted: 2009-05-14 16:20 UTC Modified: 2009-08-12 00:22 UTC
From: tyler dot reese at taqua dot com Assigned: scottmac (profile)
Status: Closed Package: hash related
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
 [2009-05-14 16:20 UTC] tyler dot reese at taqua dot com
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))

I saw that a bug addressed this same thing for the crc32 algorithm, but what about adler32?

Reproduce code:
   echo hash("adler32","abc");

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-30 13:23 UTC]
Fixed in trunk and for 5.3.1, will do 5.2 shortly.
 [2009-08-12 00:18 UTC]
Automatic comment from SVN on behalf of scottmac
Log: MFB 5.3: Fix bug #48284 (r283144) - adler32 is in the wrong order. Changed to match what zlib produces.
 [2009-08-12 00:22 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 08:01:31 2024 UTC