Annotation of embedaddon/php/ext/hash/tests/hash_copy_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: hash_copy() basic tests
3: --SKIPIF--
4: <?php extension_loaded('hash') or die('skip'); ?>
5: --FILE--
6: <?php
7:
8: $algos = hash_algos();
9:
10: foreach ($algos as $algo) {
11: $orig = hash_init($algo);
12: hash_update($orig, b"I can't remember anything");
13: $copy = hash_copy($orig);
14: var_dump(hash_final($orig));
15:
16: var_dump(hash_final($copy));
17: }
18:
19: foreach ($algos as $algo) {
20: $orig = hash_init($algo);
21: hash_update($orig, b"I can't remember anything");
22: $copy = hash_copy($orig);
23: var_dump(hash_final($orig));
24:
25: hash_update($copy, b"Can’t tell if this is true or dream");
26: var_dump(hash_final($copy));
27: }
28:
29: echo "Done\n";
30: ?>
31: --EXPECTF--
32: string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
33: string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
34: string(32) "302c45586b53a984bd3a1237cb81c15f"
35: string(32) "302c45586b53a984bd3a1237cb81c15f"
36: string(32) "e35759f6ea35db254e415b5332269435"
37: string(32) "e35759f6ea35db254e415b5332269435"
38: string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
39: string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
40: string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29"
41: string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29"
42: string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
43: string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
44: string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
45: string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
46: string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
47: string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
48: string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
49: string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
50: string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
51: string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
52: string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
53: string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
54: string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
55: string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
56: string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
57: string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
58: string(32) "a92be6c58be7688dc6cf9585a47aa625"
59: string(32) "a92be6c58be7688dc6cf9585a47aa625"
60: string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
61: string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
62: string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
63: string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
64: string(32) "32fb748ef5a36ca222511bcb99b044ee"
65: string(32) "32fb748ef5a36ca222511bcb99b044ee"
66: string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
67: string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
68: string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
69: string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
70: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
71: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
72: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
73: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
74: string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
75: string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
76: string(8) "6f7c0928"
77: string(8) "6f7c0928"
78: string(8) "e5cfc160"
79: string(8) "e5cfc160"
80: string(8) "69147a4e"
81: string(8) "69147a4e"
82: string(128) "aa39bc97c2bbcb0d79bbebfddca0bf8d769c7919c9e537e456efb5fc67f33f161758dd9da3ddcec7bbbd9c04553a03f74d2dbd26175dd75c353e9300674caa4e"
83: string(128) "aa39bc97c2bbcb0d79bbebfddca0bf8d769c7919c9e537e456efb5fc67f33f161758dd9da3ddcec7bbbd9c04553a03f74d2dbd26175dd75c353e9300674caa4e"
84: string(128) "2ecbea42273e1e18affc7ef028674c8e55f9382f36de21e5fc38af76e4a7231d0a92feca9bdf586ac18d8a5bdd82be8a1cb1e9186871d6ff785c76a9090ac774"
85: string(128) "2ecbea42273e1e18affc7ef028674c8e55f9382f36de21e5fc38af76e4a7231d0a92feca9bdf586ac18d8a5bdd82be8a1cb1e9186871d6ff785c76a9090ac774"
86: string(32) "86362472c8895e68e223ef8b3711d8d9"
87: string(32) "86362472c8895e68e223ef8b3711d8d9"
88: string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
89: string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
90: string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
91: string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
92: string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
93: string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
94: string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
95: string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
96: string(32) "ee44418e0195a0c4a35d112722919a9c"
97: string(32) "ee44418e0195a0c4a35d112722919a9c"
98: string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
99: string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
100: string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
101: string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
102: string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
103: string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
104: string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
105: string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
106: string(32) "8d0b157828328ae7d34d60b4b60c1dab"
107: string(32) "8d0b157828328ae7d34d60b4b60c1dab"
108: string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
109: string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
110: string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
111: string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
112: string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
113: string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
114: string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
115: string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
116: string(32) "d5ac4ffd08f6a57b9bd402b8068392ff"
117: string(32) "5c36f61062d091a8324991132c5e8dbd"
118: string(32) "302c45586b53a984bd3a1237cb81c15f"
119: string(32) "1d4196526aada3506efb4c7425651584"
120: string(32) "e35759f6ea35db254e415b5332269435"
121: string(32) "f255c114bd6ce94aad092b5141c00d46"
122: string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15"
123: string(40) "a273396f056554dcd491b5dea1e7baa3b89b802b"
124: string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29"
125: string(56) "1aee028400c56ceb5539625dc2f395abf491409336ca0f3e177a50e2"
126: string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
127: string(64) "268e7f4cf88504a53fd77136c4c4748169f46ff7150b376569ada9c374836944"
128: string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
129: string(96) "0d44981d04bb11b1ef75d5c2932bd0aa2785e7bc454daac954d77e2ca10047879b58997533fc99650b20049c6cb9a6cc"
130: string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
131: string(128) "28d7c721433782a880f840af0c3f3ea2cad4ef55de2114dda9d504cedeb110e1cf2519c49e4b5da3da4484bb6ba4fd1621ceadc6408f4410b2ebe9d83a4202c2"
132: string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
133: string(32) "f95f5e22b8875ee0c48219ae97f0674b"
134: string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269"
135: string(40) "900d615c1abe714e340f4ecd6a3d65599fd30ff4"
136: string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2"
137: string(64) "b9799db40d1af5614118c329169cdcd2c718db6af03bf945ea7f7ba72b8e14f4"
138: string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6"
139: string(80) "d6d12c1fca7a9c4a59c1be4f40188e92a746a035219e0a6ca1ee53b36a8282527187f7dffaa57ecc"
140: string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082"
141: string(128) "e8c6a921e7d8eac2fd21d4df6054bb27a02321b2beb5b01b6f88c40706164e64d67ec97519bf76c8af8df896745478b78d42a0159f1a0db16777771fd9d420dc"
142: string(32) "a92be6c58be7688dc6cf9585a47aa625"
143: string(32) "dc80d448032c9da9f1e0262985353c0f"
144: string(40) "a92be6c58be7688dc6cf9585a47aa62535fc2482"
145: string(40) "dc80d448032c9da9f1e0262985353c0fe37e9551"
146: string(48) "a92be6c58be7688dc6cf9585a47aa62535fc2482e0e5d12c"
147: string(48) "dc80d448032c9da9f1e0262985353c0fe37e9551165c82e1"
148: string(32) "32fb748ef5a36ca222511bcb99b044ee"
149: string(32) "e5c4212432c0e266e581d4ee6a8e20a9"
150: string(40) "32fb748ef5a36ca222511bcb99b044ee1d740bf3"
151: string(40) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e3"
152: string(48) "32fb748ef5a36ca222511bcb99b044ee1d740bf300593703"
153: string(48) "e5c4212432c0e266e581d4ee6a8e20a9d0d944e34804b0c4"
154: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
155: string(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0"
156: string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26"
157: string(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0"
158: string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5"
159: string(64) "a00961e371287c71c527a41c14564f13b6ed12ac7cd9d5f5dfb3542a25e28d3b"
160: string(8) "6f7c0928"
161: string(8) "d9141747"
162: string(8) "e5cfc160"
163: string(8) "59f8d3d2"
164: string(8) "69147a4e"
165: string(8) "3ee63999"
166: string(128) "aa39bc97c2bbcb0d79bbebfddca0bf8d769c7919c9e537e456efb5fc67f33f161758dd9da3ddcec7bbbd9c04553a03f74d2dbd26175dd75c353e9300674caa4e"
167: string(128) "709b9196710f035e3602649fdae94f939775fa6a5a0bf01f9884d8af54579cafa01a81ee23d511b85d7fb11c4d827e4309953e3c844b8d66a80c57b6eaf2d8c1"
168: string(128) "2ecbea42273e1e18affc7ef028674c8e55f9382f36de21e5fc38af76e4a7231d0a92feca9bdf586ac18d8a5bdd82be8a1cb1e9186871d6ff785c76a9090ac774"
169: string(128) "272fd2209f237b9be674eb4917eda0bd978908d56190e62aec283585d6325d8fcbba2b616dd7ba90f93cc5ecdede7185d17a06467b2a17b5c836ee115974ca20"
170: string(32) "86362472c8895e68e223ef8b3711d8d9"
171: string(32) "ebeeeb05c18af1e53d2d127b561d5e0d"
172: string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4"
173: string(40) "f1a2c9604fb40899ad502abe0dfcec65115c8a9a"
174: string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47"
175: string(48) "d3a7315773a326678208650ed02510ed96cd488d74cd5231"
176: string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2"
177: string(56) "6d7132fabc83c9ab7913748b79ecf10e25409569d3ed144177f46731"
178: string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239"
179: string(64) "7a469868ad4b92891a3a44524c58a2b8d0f3bebb92b4cf47d19bc6aba973eb95"
180: string(32) "ee44418e0195a0c4a35d112722919a9c"
181: string(32) "6ecddb39615f43fd211839287ff38461"
182: string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1"
183: string(40) "bcd2e7821723ac22e122b8b7cbbd2daaa9a862df"
184: string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db"
185: string(48) "ae74619a88dcec1fbecde28e27f009a65ecc12170824d2cd"
186: string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200"
187: string(56) "fdaba6563f1334d40de24e311f14b324577f97c3b78b9439c408cdca"
188: string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061"
189: string(64) "289a2ba4820218bdb25a6534fbdf693f9de101362584fdd41e32244c719caa37"
190: string(32) "8d0b157828328ae7d34d60b4b60c1dab"
191: string(32) "ffa7993a4e183b245263fb1f63e27343"
192: string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3"
193: string(40) "375ee5ab3a9bd07a1dbe5d071e07b2afb3165e3b"
194: string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7"
195: string(48) "c650585f93c6e041e835caedc621f8c42d8bc6829fb76789"
196: string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234"
197: string(56) "bc674d465a822817d939f19b38edde083fe5668759836c203c56e3e4"
198: string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a"
199: string(64) "da70ad9bd09ed7c9675329ea2b5279d57761807c7aeac6340d94b5d494809457"
200: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>