hash "adler32" byte order is reversed
| 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
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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-06-30 13:23 UTC] scottmac@php.net
[2009-08-12 00:22 UTC] scottmac@php.net