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