#31999 [Opn->Csd]: mhash has more constants supported than listed
| From: | nlopess@php.net | Date: | Fri, 18 Feb 2005 11:10:13 +0000 |
| Subject: | #31999 [Opn->Csd]: mhash has more constants supported than listed | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969366679@lists.php.net to get a copy of this message | ||
ID: 31999
Updated by: nlopess@php.net
Reported By: norny at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: php.net
PHP Version: 5.0.3
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2005-02-16 17:23:44] norny at yahoo dot com
Description:
------------
In the predefined constants section of http://us4.php.net/mhash, the
libmhash distributed with Win32 PHP 5.0.3 supports more than what is
listed. The following constants are supported and not documented:
MHASH_ADLER32
MHASH_MD4
MHASH_SHA256
MHASH_HAVAL224
MHASH_HAVAL256
MHASH_TIGER128
MHASH_TIGER160
The docs admit the list could be outdated, so I thought maybe yall just
needed someone to do the leg work. For some reason, instead of making a
constant MHASH_TIGER192, MHASH_TIGER is the equivilent to what I think
should be MHASH_TIGER192, though MHASH_TIGER192 is not supported. In
other words MHASH_TIGER is the TIGER192 hash.
Reproduce code:
---------------
$hashes = array('CRC32' => MHASH_CRC32,
'CRC32B' => MHASH_CRC32B,
'ADLER32' => MHASH_ADLER32,
'MD4' => MHASH_MD4,
'MD5' => MHASH_MD5,
'RIPEMD160' => MHASH_RIPEMD160,
'SHA1' => MHASH_SHA1,
'SHA256' => MHASH_SHA256,
'HAVAL128' => MHASH_HAVAL128,
'HAVAL160' => MHASH_HAVAL160,
'HAVAL192' => MHASH_HAVAL192,
'HAVAL224' => MHASH_HAVAL224,
'HAVAL256' => MHASH_HAVAL256,
'TIGER128' => MHASH_TIGER128,
'TIGER160' => MHASH_TIGER160,
'TIGER192' => MHASH_TIGER,
'GOST' => MHASH_GOST);
foreach($hashes as $name => $number) {
echo '<br />';
echo $name, ': ', bin2hex(mhash($number, 'this is a text'));
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31999&edit=1