#31999 [NEW]: mhash has more constants supported than listed
| From: | norny at yahoo dot com | Date: | Wed, 16 Feb 2005 16:23:45 +0000 |
| Subject: | #31999 [NEW]: mhash has more constants supported than listed | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969366652@lists.php.net to get a copy of this message | ||
From: norny at yahoo dot com
Operating system: php.net
PHP version: 5.0.3
PHP Bug Type: Documentation problem
Bug description: mhash has more constants supported than listed
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 bug report at http://bugs.php.net/?id=31999&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31999&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31999&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31999&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31999&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31999&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31999&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31999&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31999&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31999&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31999&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31999&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31999&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31999&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31999&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31999&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31999&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31999&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31999&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31999&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31999&r=mysqlcfg