• PHP Video Tutorials

PHP - mhash_get_hash_name() Function



The mhash_get_hash_name() function can get name of a specified hash.

Syntax

string mhash_get_hash_name( int $hash )

The mhash_get_hash_name() function can return the name of hash, or false if the hash doesn't exist.

Example

<?php
   $nbrmh = mhash_count();

   for($hs = 0; $hs <= $nbrmh; $hs++) {
      $mhnm = mhash_get_hash_name($hs);
      echo $mhnm; 
   }
?>

Output

CRC32MD5SHA1HAVAL256RIPEMD160TIGERGOSTCRC32BHAVAL224HAVAL192HAVAL160HAVAL128TIGER128TIGER160MD4SHA256ADLER32SHA224SHA512SHA384WHIRLPOOLRIPEMD128RIPEMD256RIPEMD320SNEFRU256MD2FNV132FNV1A32FNV164FNV1A64JOAATCRC32C
php_function_reference.htm
Advertisements