xref: /PHP-7.4/ext/hash/tests/hash_algos.phpt (revision c79ce48d)
1--TEST--
2Hash: hash_algos() function : basic functionality
3--FILE--
4<?php
5
6/* Prototype  : array hash_algos (void)
7 * Description: Return a list of registered hashing algorithms
8 * Source code: ext/hash/hash.c
9 * Alias to functions:
10*/
11
12echo "*** Testing hash_algos() : basic functionality ***\n";
13var_dump(hash_algos());
14
15?>
16===Done===
17--EXPECTF--
18*** Testing hash_algos() : basic functionality ***
19array(53) {
20  [%d]=>
21  string(3) "md2"
22  [%d]=>
23  string(3) "md4"
24  [%d]=>
25  string(3) "md5"
26  [%d]=>
27  string(4) "sha1"
28  [%d]=>
29  string(6) "sha224"
30  [%d]=>
31  string(6) "sha256"
32  [%d]=>
33  string(6) "sha384"
34  [%d]=>
35  string(10) "sha512/224"
36  [%d]=>
37  string(10) "sha512/256"
38  [%d]=>
39  string(6) "sha512"
40  [%d]=>
41  string(8) "sha3-224"
42  [%d]=>
43  string(8) "sha3-256"
44  [%d]=>
45  string(8) "sha3-384"
46  [%d]=>
47  string(8) "sha3-512"
48  [%d]=>
49  string(9) "ripemd128"
50  [%d]=>
51  string(9) "ripemd160"
52  [%d]=>
53  string(9) "ripemd256"
54  [%d]=>
55  string(9) "ripemd320"
56  [%d]=>
57  string(9) "whirlpool"
58  [%d]=>
59  string(10) "tiger128,3"
60  [%d]=>
61  string(10) "tiger160,3"
62  [%d]=>
63  string(10) "tiger192,3"
64  [%d]=>
65  string(10) "tiger128,4"
66  [%d]=>
67  string(10) "tiger160,4"
68  [%d]=>
69  string(10) "tiger192,4"
70  [%d]=>
71  string(6) "snefru"
72  [%d]=>
73  string(9) "snefru256"
74  [%d]=>
75  string(4) "gost"
76  [%d]=>
77  string(11) "gost-crypto"
78  [%d]=>
79  string(7) "adler32"
80  [%d]=>
81  string(5) "crc32"
82  [%d]=>
83  string(6) "crc32b"
84  [%d]=>
85  string(6) "crc32c"
86  [%d]=>
87  string(6) "fnv132"
88  [%d]=>
89  string(7) "fnv1a32"
90  [%d]=>
91  string(6) "fnv164"
92  [%d]=>
93  string(7) "fnv1a64"
94  [%d]=>
95  string(5) "joaat"
96  [%d]=>
97  string(10) "haval128,3"
98  [%d]=>
99  string(10) "haval160,3"
100  [%d]=>
101  string(10) "haval192,3"
102  [%d]=>
103  string(10) "haval224,3"
104  [%d]=>
105  string(10) "haval256,3"
106  [%d]=>
107  string(10) "haval128,4"
108  [%d]=>
109  string(10) "haval160,4"
110  [%d]=>
111  string(10) "haval192,4"
112  [%d]=>
113  string(10) "haval224,4"
114  [%d]=>
115  string(10) "haval256,4"
116  [%d]=>
117  string(10) "haval128,5"
118  [%d]=>
119  string(10) "haval160,5"
120  [%d]=>
121  string(10) "haval192,5"
122  [%d]=>
123  string(10) "haval224,5"
124  [%d]=>
125  string(10) "haval256,5"
126}
127===Done===
128