1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: d0ed07f608581a5700a10ec53a817ca788ef9638 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
5 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
6 ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
7 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
8 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
9 ZEND_END_ARG_INFO()
10
11 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
12 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
13 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
14 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
15 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
16 ZEND_END_ARG_INFO()
17
18 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_hmac, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
19 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
20 ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
21 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
22 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
23 ZEND_END_ARG_INFO()
24
25 #define arginfo_hash_hmac_file arginfo_hash_hmac
26
27 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_init, 0, 1, HashContext, 0)
28 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
29 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
30 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"")
31 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
32 ZEND_END_ARG_INFO()
33
34 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update, 0, 2, _IS_BOOL, 0)
35 ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
36 ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
37 ZEND_END_ARG_INFO()
38
39 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_stream, 0, 2, IS_LONG, 0)
40 ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
41 ZEND_ARG_INFO(0, stream)
42 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "-1")
43 ZEND_END_ARG_INFO()
44
45 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_file, 0, 2, _IS_BOOL, 0)
46 ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
47 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
48 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, stream_context, "null")
49 ZEND_END_ARG_INFO()
50
51 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_final, 0, 1, IS_STRING, 0)
52 ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
53 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
54 ZEND_END_ARG_INFO()
55
56 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_copy, 0, 1, HashContext, 0)
57 ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
58 ZEND_END_ARG_INFO()
59
60 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_algos, 0, 0, IS_ARRAY, 0)
61 ZEND_END_ARG_INFO()
62
63 #define arginfo_hash_hmac_algos arginfo_hash_algos
64
65 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0)
66 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
67 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
68 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
69 ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0)
70 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
71 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
72 ZEND_END_ARG_INFO()
73
74 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_equals, 0, 2, _IS_BOOL, 0)
75 ZEND_ARG_TYPE_INFO(0, known_string, IS_STRING, 0)
76 ZEND_ARG_TYPE_INFO(0, user_string, IS_STRING, 0)
77 ZEND_END_ARG_INFO()
78
79 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_hkdf, 0, 2, IS_STRING, 0)
80 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
81 ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
82 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
83 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, info, IS_STRING, 0, "\"\"")
84 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 0, "\"\"")
85 ZEND_END_ARG_INFO()
86
87 #if defined(PHP_MHASH_BC)
88 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_block_size, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
89 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
90 ZEND_END_ARG_INFO()
91 #endif
92
93 #if defined(PHP_MHASH_BC)
94 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_hash_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
95 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
96 ZEND_END_ARG_INFO()
97 #endif
98
99 #if defined(PHP_MHASH_BC)
100 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_keygen_s2k, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
101 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
102 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
103 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
104 ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
105 ZEND_END_ARG_INFO()
106 #endif
107
108 #if defined(PHP_MHASH_BC)
109 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mhash_count, 0, 0, IS_LONG, 0)
110 ZEND_END_ARG_INFO()
111 #endif
112
113 #if defined(PHP_MHASH_BC)
114 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
115 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
116 ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
117 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 1, "null")
118 ZEND_END_ARG_INFO()
119 #endif
120
121 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_HashContext___construct, 0, 0, 0)
122 ZEND_END_ARG_INFO()
123
124 #define arginfo_class_HashContext___serialize arginfo_hash_algos
125
126 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_HashContext___unserialize, 0, 1, IS_VOID, 0)
127 ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0)
128 ZEND_END_ARG_INFO()
129
130
131 ZEND_FUNCTION(hash);
132 ZEND_FUNCTION(hash_file);
133 ZEND_FUNCTION(hash_hmac);
134 ZEND_FUNCTION(hash_hmac_file);
135 ZEND_FUNCTION(hash_init);
136 ZEND_FUNCTION(hash_update);
137 ZEND_FUNCTION(hash_update_stream);
138 ZEND_FUNCTION(hash_update_file);
139 ZEND_FUNCTION(hash_final);
140 ZEND_FUNCTION(hash_copy);
141 ZEND_FUNCTION(hash_algos);
142 ZEND_FUNCTION(hash_hmac_algos);
143 ZEND_FUNCTION(hash_pbkdf2);
144 ZEND_FUNCTION(hash_equals);
145 ZEND_FUNCTION(hash_hkdf);
146 #if defined(PHP_MHASH_BC)
147 ZEND_FUNCTION(mhash_get_block_size);
148 #endif
149 #if defined(PHP_MHASH_BC)
150 ZEND_FUNCTION(mhash_get_hash_name);
151 #endif
152 #if defined(PHP_MHASH_BC)
153 ZEND_FUNCTION(mhash_keygen_s2k);
154 #endif
155 #if defined(PHP_MHASH_BC)
156 ZEND_FUNCTION(mhash_count);
157 #endif
158 #if defined(PHP_MHASH_BC)
159 ZEND_FUNCTION(mhash);
160 #endif
161 ZEND_METHOD(HashContext, __construct);
162 ZEND_METHOD(HashContext, __serialize);
163 ZEND_METHOD(HashContext, __unserialize);
164
165
166 static const zend_function_entry ext_functions[] = {
167 ZEND_FE(hash, arginfo_hash)
168 ZEND_FE(hash_file, arginfo_hash_file)
169 ZEND_FE(hash_hmac, arginfo_hash_hmac)
170 ZEND_FE(hash_hmac_file, arginfo_hash_hmac_file)
171 ZEND_FE(hash_init, arginfo_hash_init)
172 ZEND_FE(hash_update, arginfo_hash_update)
173 ZEND_FE(hash_update_stream, arginfo_hash_update_stream)
174 ZEND_FE(hash_update_file, arginfo_hash_update_file)
175 ZEND_FE(hash_final, arginfo_hash_final)
176 ZEND_FE(hash_copy, arginfo_hash_copy)
177 ZEND_FE(hash_algos, arginfo_hash_algos)
178 ZEND_FE(hash_hmac_algos, arginfo_hash_hmac_algos)
179 ZEND_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
180 ZEND_FE(hash_equals, arginfo_hash_equals)
181 ZEND_FE(hash_hkdf, arginfo_hash_hkdf)
182 #if defined(PHP_MHASH_BC)
183 ZEND_DEP_FE(mhash_get_block_size, arginfo_mhash_get_block_size)
184 #endif
185 #if defined(PHP_MHASH_BC)
186 ZEND_DEP_FE(mhash_get_hash_name, arginfo_mhash_get_hash_name)
187 #endif
188 #if defined(PHP_MHASH_BC)
189 ZEND_DEP_FE(mhash_keygen_s2k, arginfo_mhash_keygen_s2k)
190 #endif
191 #if defined(PHP_MHASH_BC)
192 ZEND_DEP_FE(mhash_count, arginfo_mhash_count)
193 #endif
194 #if defined(PHP_MHASH_BC)
195 ZEND_DEP_FE(mhash, arginfo_mhash)
196 #endif
197 ZEND_FE_END
198 };
199
200
201 static const zend_function_entry class_HashContext_methods[] = {
202 ZEND_ME(HashContext, __construct, arginfo_class_HashContext___construct, ZEND_ACC_PRIVATE)
203 ZEND_ME(HashContext, __serialize, arginfo_class_HashContext___serialize, ZEND_ACC_PUBLIC)
204 ZEND_ME(HashContext, __unserialize, arginfo_class_HashContext___unserialize, ZEND_ACC_PUBLIC)
205 ZEND_FE_END
206 };
207
register_class_HashContext(void)208 static zend_class_entry *register_class_HashContext(void)
209 {
210 zend_class_entry ce, *class_entry;
211
212 INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
213 class_entry = zend_register_internal_class_ex(&ce, NULL);
214 class_entry->ce_flags |= ZEND_ACC_FINAL;
215
216 return class_entry;
217 }
218