Bug #60922 [Opn->Asn]: tests fail for mhash() and mhash_keygen_s2k() functions and MHASH_TIGER
| From: | mike@php.net | Date: | Mon, 30 Jan 2012 12:35:30 +0000 |
| Subject: | Bug #60922 [Opn->Asn]: tests fail for mhash() and mhash_keygen_s2k() functions and MHASH_TIGER | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166963@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60922&edit=1
ID: 60922
Updated by: mike@php.net
Reported by: silvan at etoy dot com
Summary: tests fail for mhash() and mhash_keygen_s2k()
functions and MHASH_TIGER
-Status: Open
+Status: Assigned
Type: Bug
Package: mhash related
Operating System: Mac OS X
PHP Version: 5.4SVN-2012-01-29 (SVN)
-Assigned To:
+Assigned To: mike
Block user comment: N
Private report: N
New Comment:
Oh my, mhash compat mode of ext/hash eh?
I totally missed that while fixing bug #60221.
Previous Comments:
------------------------------------------------------------------------
[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