xref: /PHP-5.3/ext/hash/tests/hash_algos.phpt (revision c41cc6aa)
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(42) {
22  [0]=>
23  string(3) "md2"
24  [1]=>
25  string(3) "md4"
26  [2]=>
27  string(3) "md5"
28  [3]=>
29  string(4) "sha1"
30  [4]=>
31  string(6) "sha224"
32  [5]=>
33  string(6) "sha256"
34  [6]=>
35  string(6) "sha384"
36  [7]=>
37  string(6) "sha512"
38  [8]=>
39  string(9) "ripemd128"
40  [9]=>
41  string(9) "ripemd160"
42  [10]=>
43  string(9) "ripemd256"
44  [11]=>
45  string(9) "ripemd320"
46  [12]=>
47  string(9) "whirlpool"
48  [13]=>
49  string(10) "tiger128,3"
50  [14]=>
51  string(10) "tiger160,3"
52  [15]=>
53  string(10) "tiger192,3"
54  [16]=>
55  string(10) "tiger128,4"
56  [17]=>
57  string(10) "tiger160,4"
58  [18]=>
59  string(10) "tiger192,4"
60  [19]=>
61  string(6) "snefru"
62  [20]=>
63  string(9) "snefru256"
64  [21]=>
65  string(4) "gost"
66  [22]=>
67  string(7) "adler32"
68  [23]=>
69  string(5) "crc32"
70  [24]=>
71  string(6) "crc32b"
72  [25]=>
73  string(7) "salsa10"
74  [26]=>
75  string(7) "salsa20"
76  [27]=>
77  string(10) "haval128,3"
78  [28]=>
79  string(10) "haval160,3"
80  [29]=>
81  string(10) "haval192,3"
82  [30]=>
83  string(10) "haval224,3"
84  [31]=>
85  string(10) "haval256,3"
86  [32]=>
87  string(10) "haval128,4"
88  [33]=>
89  string(10) "haval160,4"
90  [34]=>
91  string(10) "haval192,4"
92  [35]=>
93  string(10) "haval224,4"
94  [36]=>
95  string(10) "haval256,4"
96  [37]=>
97  string(10) "haval128,5"
98  [38]=>
99  string(10) "haval160,5"
100  [39]=>
101  string(10) "haval192,5"
102  [40]=>
103  string(10) "haval224,5"
104  [41]=>
105  string(10) "haval256,5"
106}
107===Done===