📜  PHP mhash_count()函数

📅  最后修改于: 2022-05-13 01:56:19.874000             🧑  作者: Mango

PHP mhash_count()函数

mhash_count()函数是PHP中的一个内置函数,用于获取当前安装在系统中的 MHash 中的最高可用哈希 ID,如 SHA1、MD% 等。它接受零输入参数并返回一个整数值。

句法:

int mhash_count( void )

参数:此函数不接受任何参数。

返回值:此函数返回一个数字索引数组,其中包含支持的散列算法列表。

下面的程序说明了PHP中的mhash_count()函数:

程序:

PHP


输出:

0 Hash is CRC32 and its block size is 4
1 Hash is MD5 and its block size is 16
2 Hash is SHA1 and its block size is 20
3 Hash is HAVAL256 and its block size is 32
4 Hash is  and its block size is 0
5 Hash is RIPEMD160 and its block size is 20
6 Hash is  and its block size is 0
7 Hash is TIGER and its block size is 24
8 Hash is GOST and its block size is 32
9 Hash is CRC32B and its block size is 4
10 Hash is HAVAL224 and its block size is 28
11 Hash is HAVAL192 and its block size is 24
12 Hash is HAVAL160 and its block size is 20
13 Hash is HAVAL128 and its block size is 16
14 Hash is TIGER128 and its block size is 16
15 Hash is TIGER160 and its block size is 20
16 Hash is MD4 and its block size is 16
17 Hash is SHA256 and its block size is 32
18 Hash is ADLER32 and its block size is 4
19 Hash is SHA224 and its block size is 28
20 Hash is SHA512 and its block size is 64
21 Hash is SHA384 and its block size is 48
22 Hash is WHIRLPOOL and its block size is 64
23 Hash is RIPEMD128 and its block size is 16
24 Hash is RIPEMD256 and its block size is 32
25 Hash is RIPEMD320 and its block size is 40
26 Hash is  and its block size is 0
27 Hash is SNEFRU256 and its block size is 32
28 Hash is MD2 and its block size is 16
29 Hash is FNV132 and its block size is 4
30 Hash is FNV1A32 and its block size is 4
31 Hash is FNV164 and its block size is 8
32 Hash is FNV1A64 and its block size is 8
33 Hash is JOAAT and its block size is 4

参考: https://www. PHP.net/manual/en/函数.mhash-count。 PHP