Coverage Report

Created: 2025-06-13 06:43

/src/php-src/ext/hash/hash_arginfo.h
Line
Count
Source
1
/* This is a generated file, edit the .stub.php file instead.
2
 * Stub hash: b0fe91da9b0469b44a9647b774b9b00498592e30 */
3
4
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash, 0, 2, IS_STRING, 0)
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_INFO_EX(arginfo_hash_hmac, 0, 3, IS_STRING, 0)
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
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash_hmac_file, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
26
  ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
27
  ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
28
  ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
29
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
30
ZEND_END_ARG_INFO()
31
32
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_init, 0, 1, HashContext, 0)
33
  ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
34
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
35
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"")
36
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
37
ZEND_END_ARG_INFO()
38
39
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update, 0, 2, IS_TRUE, 0)
40
  ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
41
  ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
42
ZEND_END_ARG_INFO()
43
44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_stream, 0, 2, IS_LONG, 0)
45
  ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
46
  ZEND_ARG_INFO(0, stream)
47
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "-1")
48
ZEND_END_ARG_INFO()
49
50
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_update_file, 0, 2, _IS_BOOL, 0)
51
  ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
52
  ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
53
  ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, stream_context, "null")
54
ZEND_END_ARG_INFO()
55
56
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_final, 0, 1, IS_STRING, 0)
57
  ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
58
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
59
ZEND_END_ARG_INFO()
60
61
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_hash_copy, 0, 1, HashContext, 0)
62
  ZEND_ARG_OBJ_INFO(0, context, HashContext, 0)
63
ZEND_END_ARG_INFO()
64
65
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_algos, 0, 0, IS_ARRAY, 0)
66
ZEND_END_ARG_INFO()
67
68
#define arginfo_hash_hmac_algos arginfo_hash_algos
69
70
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0)
71
  ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
72
  ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
73
  ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
74
  ZEND_ARG_TYPE_INFO(0, iterations, IS_LONG, 0)
75
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
76
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binary, _IS_BOOL, 0, "false")
77
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
78
ZEND_END_ARG_INFO()
79
80
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_equals, 0, 2, _IS_BOOL, 0)
81
  ZEND_ARG_TYPE_INFO(0, known_string, IS_STRING, 0)
82
  ZEND_ARG_TYPE_INFO(0, user_string, IS_STRING, 0)
83
ZEND_END_ARG_INFO()
84
85
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_hkdf, 0, 2, IS_STRING, 0)
86
  ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
87
  ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
88
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
89
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, info, IS_STRING, 0, "\"\"")
90
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 0, "\"\"")
91
ZEND_END_ARG_INFO()
92
93
#if defined(PHP_MHASH_BC)
94
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_block_size, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
95
  ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
96
ZEND_END_ARG_INFO()
97
98
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_get_hash_name, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
99
  ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
100
ZEND_END_ARG_INFO()
101
102
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash_keygen_s2k, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
103
  ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
104
  ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
105
  ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
106
  ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
107
ZEND_END_ARG_INFO()
108
109
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mhash_count, 0, 0, IS_LONG, 0)
110
ZEND_END_ARG_INFO()
111
112
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mhash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
113
  ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
114
  ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
115
  ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 1, "null")
116
ZEND_END_ARG_INFO()
117
#endif
118
119
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_HashContext___construct, 0, 0, 0)
120
ZEND_END_ARG_INFO()
121
122
#define arginfo_class_HashContext___serialize arginfo_hash_algos
123
124
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_HashContext___unserialize, 0, 1, IS_VOID, 0)
125
  ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0)
126
ZEND_END_ARG_INFO()
127
128
#define arginfo_class_HashContext___debugInfo arginfo_hash_algos
129
130
ZEND_FUNCTION(hash);
131
ZEND_FUNCTION(hash_file);
132
ZEND_FUNCTION(hash_hmac);
133
ZEND_FUNCTION(hash_hmac_file);
134
ZEND_FUNCTION(hash_init);
135
ZEND_FUNCTION(hash_update);
136
ZEND_FUNCTION(hash_update_stream);
137
ZEND_FUNCTION(hash_update_file);
138
ZEND_FUNCTION(hash_final);
139
ZEND_FUNCTION(hash_copy);
140
ZEND_FUNCTION(hash_algos);
141
ZEND_FUNCTION(hash_hmac_algos);
142
ZEND_FUNCTION(hash_pbkdf2);
143
ZEND_FUNCTION(hash_equals);
144
ZEND_FUNCTION(hash_hkdf);
145
#if defined(PHP_MHASH_BC)
146
ZEND_FUNCTION(mhash_get_block_size);
147
ZEND_FUNCTION(mhash_get_hash_name);
148
ZEND_FUNCTION(mhash_keygen_s2k);
149
ZEND_FUNCTION(mhash_count);
150
ZEND_FUNCTION(mhash);
151
#endif
152
ZEND_METHOD(HashContext, __construct);
153
ZEND_METHOD(HashContext, __serialize);
154
ZEND_METHOD(HashContext, __unserialize);
155
ZEND_METHOD(HashContext, __debugInfo);
156
157
static const zend_function_entry ext_functions[] = {
158
  ZEND_FE(hash, arginfo_hash)
159
  ZEND_FE(hash_file, arginfo_hash_file)
160
  ZEND_FE(hash_hmac, arginfo_hash_hmac)
161
  ZEND_FE(hash_hmac_file, arginfo_hash_hmac_file)
162
  ZEND_FE(hash_init, arginfo_hash_init)
163
  ZEND_FE(hash_update, arginfo_hash_update)
164
  ZEND_FE(hash_update_stream, arginfo_hash_update_stream)
165
  ZEND_FE(hash_update_file, arginfo_hash_update_file)
166
  ZEND_FE(hash_final, arginfo_hash_final)
167
  ZEND_FE(hash_copy, arginfo_hash_copy)
168
  ZEND_RAW_FENTRY("hash_algos", zif_hash_algos, arginfo_hash_algos, ZEND_ACC_COMPILE_TIME_EVAL, NULL, NULL)
169
  ZEND_RAW_FENTRY("hash_hmac_algos", zif_hash_hmac_algos, arginfo_hash_hmac_algos, ZEND_ACC_COMPILE_TIME_EVAL, NULL, NULL)
170
  ZEND_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
171
  ZEND_FE(hash_equals, arginfo_hash_equals)
172
  ZEND_FE(hash_hkdf, arginfo_hash_hkdf)
173
#if defined(PHP_MHASH_BC)
174
  ZEND_RAW_FENTRY("mhash_get_block_size", zif_mhash_get_block_size, arginfo_mhash_get_block_size, ZEND_ACC_DEPRECATED, NULL, NULL)
175
  ZEND_RAW_FENTRY("mhash_get_hash_name", zif_mhash_get_hash_name, arginfo_mhash_get_hash_name, ZEND_ACC_DEPRECATED, NULL, NULL)
176
  ZEND_RAW_FENTRY("mhash_keygen_s2k", zif_mhash_keygen_s2k, arginfo_mhash_keygen_s2k, ZEND_ACC_DEPRECATED, NULL, NULL)
177
  ZEND_RAW_FENTRY("mhash_count", zif_mhash_count, arginfo_mhash_count, ZEND_ACC_DEPRECATED, NULL, NULL)
178
  ZEND_RAW_FENTRY("mhash", zif_mhash, arginfo_mhash, ZEND_ACC_DEPRECATED, NULL, NULL)
179
#endif
180
  ZEND_FE_END
181
};
182
183
static const zend_function_entry class_HashContext_methods[] = {
184
  ZEND_ME(HashContext, __construct, arginfo_class_HashContext___construct, ZEND_ACC_PRIVATE)
185
  ZEND_ME(HashContext, __serialize, arginfo_class_HashContext___serialize, ZEND_ACC_PUBLIC)
186
  ZEND_ME(HashContext, __unserialize, arginfo_class_HashContext___unserialize, ZEND_ACC_PUBLIC)
187
  ZEND_ME(HashContext, __debugInfo, arginfo_class_HashContext___debugInfo, ZEND_ACC_PUBLIC)
188
  ZEND_FE_END
189
};
190
191
static void register_hash_symbols(int module_number)
192
16
{
193
16
  REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_PERSISTENT);
194
195
196
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hmac", sizeof("hash_hmac") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
197
198
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hmac_file", sizeof("hash_hmac_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
199
200
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_init", sizeof("hash_init") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
201
202
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_pbkdf2", sizeof("hash_pbkdf2") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
203
204
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
205
206
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
207
208
16
  zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hkdf", sizeof("hash_hkdf") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
209
#if defined(PHP_MHASH_BC)
210
211
  zend_attribute *attribute_Deprecated_func_mhash_get_block_size_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_block_size", sizeof("mhash_get_block_size") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
212
  zval attribute_Deprecated_func_mhash_get_block_size_0_arg0;
213
  zend_string *attribute_Deprecated_func_mhash_get_block_size_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1);
214
  ZVAL_STR(&attribute_Deprecated_func_mhash_get_block_size_0_arg0, attribute_Deprecated_func_mhash_get_block_size_0_arg0_str);
215
  ZVAL_COPY_VALUE(&attribute_Deprecated_func_mhash_get_block_size_0->args[0].value, &attribute_Deprecated_func_mhash_get_block_size_0_arg0);
216
  attribute_Deprecated_func_mhash_get_block_size_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
217
218
  zend_attribute *attribute_Deprecated_func_mhash_get_hash_name_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_hash_name", sizeof("mhash_get_hash_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
219
  zval attribute_Deprecated_func_mhash_get_hash_name_0_arg0;
220
  zend_string *attribute_Deprecated_func_mhash_get_hash_name_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1);
221
  ZVAL_STR(&attribute_Deprecated_func_mhash_get_hash_name_0_arg0, attribute_Deprecated_func_mhash_get_hash_name_0_arg0_str);
222
  ZVAL_COPY_VALUE(&attribute_Deprecated_func_mhash_get_hash_name_0->args[0].value, &attribute_Deprecated_func_mhash_get_hash_name_0_arg0);
223
  attribute_Deprecated_func_mhash_get_hash_name_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
224
225
  zend_attribute *attribute_Deprecated_func_mhash_keygen_s2k_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_keygen_s2k", sizeof("mhash_keygen_s2k") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
226
  zval attribute_Deprecated_func_mhash_keygen_s2k_0_arg0;
227
  zend_string *attribute_Deprecated_func_mhash_keygen_s2k_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1);
228
  ZVAL_STR(&attribute_Deprecated_func_mhash_keygen_s2k_0_arg0, attribute_Deprecated_func_mhash_keygen_s2k_0_arg0_str);
229
  ZVAL_COPY_VALUE(&attribute_Deprecated_func_mhash_keygen_s2k_0->args[0].value, &attribute_Deprecated_func_mhash_keygen_s2k_0_arg0);
230
  attribute_Deprecated_func_mhash_keygen_s2k_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
231
232
  zend_attribute *attribute_Deprecated_func_mhash_count_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_count", sizeof("mhash_count") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
233
  zval attribute_Deprecated_func_mhash_count_0_arg0;
234
  zend_string *attribute_Deprecated_func_mhash_count_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1);
235
  ZVAL_STR(&attribute_Deprecated_func_mhash_count_0_arg0, attribute_Deprecated_func_mhash_count_0_arg0_str);
236
  ZVAL_COPY_VALUE(&attribute_Deprecated_func_mhash_count_0->args[0].value, &attribute_Deprecated_func_mhash_count_0_arg0);
237
  attribute_Deprecated_func_mhash_count_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
238
239
  zend_attribute *attribute_Deprecated_func_mhash_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash", sizeof("mhash") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1);
240
  zval attribute_Deprecated_func_mhash_0_arg0;
241
  zend_string *attribute_Deprecated_func_mhash_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1);
242
  ZVAL_STR(&attribute_Deprecated_func_mhash_0_arg0, attribute_Deprecated_func_mhash_0_arg0_str);
243
  ZVAL_COPY_VALUE(&attribute_Deprecated_func_mhash_0->args[0].value, &attribute_Deprecated_func_mhash_0_arg0);
244
  attribute_Deprecated_func_mhash_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
245
#endif
246
16
}
247
248
static zend_class_entry *register_class_HashContext(void)
249
16
{
250
16
  zend_class_entry ce, *class_entry;
251
252
16
  INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
253
16
  class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
254
255
16
  return class_entry;
256
16
}