Edit report at https://bugs.php.net/bug.php?id=60922&edit=1
ID: 60922
Comment by: jamie-lists at boxlightmedia dot com
Reported by: silvan at etoy dot com
Summary: tests fail for mhash() and mhash_keygen_s2k()
functions and MHASH_TIGER
Status: Assigned
Type: Bug
Package: mhash related
Operating System: Mac OS X
PHP Version: 5.4SVN-2012-01-29 (SVN)
Assigned To: mike
Block user comment: N
Private report: N
New Comment:
Also failing for me on 5.4RC6 (PHP 5.4.0-rc6-pl0-gentoo (cli) (built: Jan 30
2012
11:59:37)
Result
-------
MHASH_GOST
ok
MHASH_TIGER: string(48) "fdb9019a79c33a95677e2097abae91eb0de00b3054bb5c39"
MHASH_TIGER: string(48) "953ac3799a01b9fdeb91aeab97207e67395cbb54300be00d"
If I swap back to PHP 5.3.9-pl0-gentoo (cli) (built: Jan 30 2012 13:21:46), it
returns the correct hash.
Previous Comments:
------------------------------------------------------------------------
[2012-01-30 12:35:30] [email protected]
Oh my, mhash compat mode of ext/hash eh?
I totally missed that while fixing bug #60221.
------------------------------------------------------------------------
[2012-01-29 10:53:16] silvan at etoy dot com
Description:
------------
make test failed test summary:
mhash() test [ext/hash/tests/mhash_001.phpt]
mhash_keygen_s2k() test [ext/hash/tests/mhash_003.phpt
mhash_003.out:
MHASH_TIGER: string(200)
"67eac97b9dca0a47b1f6262f330264e4ce1c233760fe3255f642512fd3127929baccf1e758236b2768a4c2c0c06e118b19e40e2f04a5f745820fb8a99bdbc00698702a4d3120171856c4c94bda79ba1b4f60d509d7f8954da818a29797368dd47c1122aa"
MHASH_TIGER: string(200)
"470aca9d7bc9ea67e46402332f26f6b15532fe6037231cce297912d32f5142f6276b2358e7f1ccba8b116ec0c0c2a46845f7a5042f0ee41906c0db9ba9b80f82181720314d2a70981bba79da4bc9c4564d95f8d709d5604fd48d369797a218a862196f48"
Test script:
---------------
mhash_003.php
foreach ($supported_hash_al as $hash=>$wanted) {
$passwd = str_repeat($hash, 10);
$salt = str_repeat($hash, 2);
$result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100);
if (!strcmp(bin2hex($result), $wanted)) {
echo "$hash\nok\n";
} else {
echo "$hash: ";
var_dump($wanted);
echo "$hash: ";
var_dump(bin2hex($result));
}
echo "\n";
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60922&edit=1