php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #31999 mhash has more constants supported than listed
Submitted: 2005-02-16 17:23 UTC Modified: 2005-02-18 12:10 UTC
From: norny at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.3 OS: php.net
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: norny at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-02-16 17:23 UTC] 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'));
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-18 12:10 UTC] nlopess@php.net
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.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=980b52a90b8c1f3faa883c1330aa1bf336e42715
Log: fix #31999: update constants list
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 11:00:01 2025 UTC