xref: /php-src/ext/sodium/libsodium_arginfo.h (revision 5dd05756)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 89cbb449ee6146dc8d50ba4bb1e76f83444a2db2 */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
5 ZEND_END_ARG_INFO()
6 
7 #if defined(HAVE_AESGCM)
8 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_aes256gcm_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
9 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
10 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
11 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
12 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
13 ZEND_END_ARG_INFO()
14 
15 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_encrypt, 0, 4, IS_STRING, 0)
16 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
17 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
18 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
19 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
20 ZEND_END_ARG_INFO()
21 
22 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_keygen, 0, 0, IS_STRING, 0)
23 ZEND_END_ARG_INFO()
24 #endif
25 
26 #if defined(crypto_aead_aegis128l_KEYBYTES)
27 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_aegis128l_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
28 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
29 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
30 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
31 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
32 ZEND_END_ARG_INFO()
33 
34 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis128l_encrypt, 0, 4, IS_STRING, 0)
35 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
36 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
37 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
38 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
39 ZEND_END_ARG_INFO()
40 
41 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis128l_keygen, 0, 0, IS_STRING, 0)
42 ZEND_END_ARG_INFO()
43 #endif
44 
45 #if defined(crypto_aead_aegis256_KEYBYTES)
46 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_aegis256_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
47 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
48 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
49 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
50 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
51 ZEND_END_ARG_INFO()
52 
53 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis256_encrypt, 0, 4, IS_STRING, 0)
54 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
55 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
56 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
57 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
58 ZEND_END_ARG_INFO()
59 
60 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis256_keygen, 0, 0, IS_STRING, 0)
61 ZEND_END_ARG_INFO()
62 #endif
63 
64 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_chacha20poly1305_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
65 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
66 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
67 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
68 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
69 ZEND_END_ARG_INFO()
70 
71 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_chacha20poly1305_encrypt, 0, 4, IS_STRING, 0)
72 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
73 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
74 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
75 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
76 ZEND_END_ARG_INFO()
77 
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_chacha20poly1305_keygen, 0, 0, IS_STRING, 0)
79 ZEND_END_ARG_INFO()
80 
81 #define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt arginfo_sodium_crypto_aead_chacha20poly1305_decrypt
82 
83 #define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt arginfo_sodium_crypto_aead_chacha20poly1305_encrypt
84 
85 #define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
86 
87 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
88 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
89 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
90 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
91 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
92 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
93 ZEND_END_ARG_INFO()
94 
95 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen, 0, 0, IS_STRING, 0)
96 ZEND_END_ARG_INFO()
97 
98 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, 0, 4, IS_STRING, 0)
99 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
100 	ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
101 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
102 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
103 ZEND_END_ARG_INFO()
104 #endif
105 
106 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_auth, 0, 2, IS_STRING, 0)
107 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
108 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
109 ZEND_END_ARG_INFO()
110 
111 #define arginfo_sodium_crypto_auth_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
112 
113 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_auth_verify, 0, 3, _IS_BOOL, 0)
114 	ZEND_ARG_TYPE_INFO(0, mac, IS_STRING, 0)
115 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
116 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
117 ZEND_END_ARG_INFO()
118 
119 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box, 0, 3, IS_STRING, 0)
120 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
121 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
122 	ZEND_ARG_TYPE_INFO(0, key_pair, IS_STRING, 0)
123 ZEND_END_ARG_INFO()
124 
125 #define arginfo_sodium_crypto_box_keypair arginfo_sodium_crypto_aead_chacha20poly1305_keygen
126 
127 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_seed_keypair, 0, 1, IS_STRING, 0)
128 	ZEND_ARG_TYPE_INFO(0, seed, IS_STRING, 0)
129 ZEND_END_ARG_INFO()
130 
131 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey, 0, 2, IS_STRING, 0)
132 	ZEND_ARG_TYPE_INFO(0, secret_key, IS_STRING, 0)
133 	ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
134 ZEND_END_ARG_INFO()
135 
136 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_open, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
137 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
138 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
139 	ZEND_ARG_TYPE_INFO(0, key_pair, IS_STRING, 0)
140 ZEND_END_ARG_INFO()
141 
142 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_publickey, 0, 1, IS_STRING, 0)
143 	ZEND_ARG_TYPE_INFO(0, key_pair, IS_STRING, 0)
144 ZEND_END_ARG_INFO()
145 
146 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_publickey_from_secretkey, 0, 1, IS_STRING, 0)
147 	ZEND_ARG_TYPE_INFO(0, secret_key, IS_STRING, 0)
148 ZEND_END_ARG_INFO()
149 
150 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_seal, 0, 2, IS_STRING, 0)
151 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
152 	ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
153 ZEND_END_ARG_INFO()
154 
155 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_seal_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
156 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
157 	ZEND_ARG_TYPE_INFO(0, key_pair, IS_STRING, 0)
158 ZEND_END_ARG_INFO()
159 
160 #define arginfo_sodium_crypto_box_secretkey arginfo_sodium_crypto_box_publickey
161 
162 #if defined(crypto_core_ristretto255_HASHBYTES)
163 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_add, 0, 2, IS_STRING, 0)
164 	ZEND_ARG_TYPE_INFO(0, p, IS_STRING, 0)
165 	ZEND_ARG_TYPE_INFO(0, q, IS_STRING, 0)
166 ZEND_END_ARG_INFO()
167 
168 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_from_hash, 0, 1, IS_STRING, 0)
169 	ZEND_ARG_TYPE_INFO(0, s, IS_STRING, 0)
170 ZEND_END_ARG_INFO()
171 
172 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_is_valid_point, 0, 1, _IS_BOOL, 0)
173 	ZEND_ARG_TYPE_INFO(0, s, IS_STRING, 0)
174 ZEND_END_ARG_INFO()
175 
176 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_random, 0, 0, IS_STRING, 0)
177 ZEND_END_ARG_INFO()
178 
179 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_scalar_add, 0, 2, IS_STRING, 0)
180 	ZEND_ARG_TYPE_INFO(0, x, IS_STRING, 0)
181 	ZEND_ARG_TYPE_INFO(0, y, IS_STRING, 0)
182 ZEND_END_ARG_INFO()
183 
184 #define arginfo_sodium_crypto_core_ristretto255_scalar_complement arginfo_sodium_crypto_core_ristretto255_from_hash
185 
186 #define arginfo_sodium_crypto_core_ristretto255_scalar_invert arginfo_sodium_crypto_core_ristretto255_from_hash
187 
188 #define arginfo_sodium_crypto_core_ristretto255_scalar_mul arginfo_sodium_crypto_core_ristretto255_scalar_add
189 
190 #define arginfo_sodium_crypto_core_ristretto255_scalar_negate arginfo_sodium_crypto_core_ristretto255_from_hash
191 
192 #define arginfo_sodium_crypto_core_ristretto255_scalar_random arginfo_sodium_crypto_core_ristretto255_random
193 
194 #define arginfo_sodium_crypto_core_ristretto255_scalar_reduce arginfo_sodium_crypto_core_ristretto255_from_hash
195 
196 #define arginfo_sodium_crypto_core_ristretto255_scalar_sub arginfo_sodium_crypto_core_ristretto255_scalar_add
197 
198 #define arginfo_sodium_crypto_core_ristretto255_sub arginfo_sodium_crypto_core_ristretto255_add
199 #endif
200 
201 #define arginfo_sodium_crypto_kx_keypair arginfo_sodium_crypto_aead_chacha20poly1305_keygen
202 
203 #define arginfo_sodium_crypto_kx_publickey arginfo_sodium_crypto_box_publickey
204 
205 #define arginfo_sodium_crypto_kx_secretkey arginfo_sodium_crypto_box_publickey
206 
207 #define arginfo_sodium_crypto_kx_seed_keypair arginfo_sodium_crypto_box_seed_keypair
208 
209 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kx_client_session_keys, 0, 2, IS_ARRAY, 0)
210 	ZEND_ARG_TYPE_INFO(0, client_key_pair, IS_STRING, 0)
211 	ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
212 ZEND_END_ARG_INFO()
213 
214 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kx_server_session_keys, 0, 2, IS_ARRAY, 0)
215 	ZEND_ARG_TYPE_INFO(0, server_key_pair, IS_STRING, 0)
216 	ZEND_ARG_TYPE_INFO(0, client_key, IS_STRING, 0)
217 ZEND_END_ARG_INFO()
218 
219 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash, 0, 1, IS_STRING, 0)
220 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
221 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"")
222 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
223 ZEND_END_ARG_INFO()
224 
225 #define arginfo_sodium_crypto_generichash_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
226 
227 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_init, 0, 0, IS_STRING, 0)
228 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"")
229 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
230 ZEND_END_ARG_INFO()
231 
232 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_update, 0, 2, IS_TRUE, 0)
233 	ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
234 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
235 ZEND_END_ARG_INFO()
236 
237 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_final, 0, 1, IS_STRING, 0)
238 	ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
239 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
240 ZEND_END_ARG_INFO()
241 
242 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kdf_derive_from_key, 0, 4, IS_STRING, 0)
243 	ZEND_ARG_TYPE_INFO(0, subkey_length, IS_LONG, 0)
244 	ZEND_ARG_TYPE_INFO(0, subkey_id, IS_LONG, 0)
245 	ZEND_ARG_TYPE_INFO(0, context, IS_STRING, 0)
246 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
247 ZEND_END_ARG_INFO()
248 
249 #define arginfo_sodium_crypto_kdf_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
250 
251 #if defined(crypto_pwhash_SALTBYTES)
252 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash, 0, 5, IS_STRING, 0)
253 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
254 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
255 	ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
256 	ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
257 	ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
258 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, algo, IS_LONG, 0, "SODIUM_CRYPTO_PWHASH_ALG_DEFAULT")
259 ZEND_END_ARG_INFO()
260 
261 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_str, 0, 3, IS_STRING, 0)
262 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
263 	ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
264 	ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
265 ZEND_END_ARG_INFO()
266 
267 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_str_verify, 0, 2, _IS_BOOL, 0)
268 	ZEND_ARG_TYPE_INFO(0, hash, IS_STRING, 0)
269 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
270 ZEND_END_ARG_INFO()
271 #endif
272 
273 #if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
274 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_str_needs_rehash, 0, 3, _IS_BOOL, 0)
275 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
276 	ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
277 	ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
278 ZEND_END_ARG_INFO()
279 #endif
280 
281 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
282 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_scryptsalsa208sha256, 0, 5, IS_STRING, 0)
283 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
284 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
285 	ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
286 	ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
287 	ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
288 ZEND_END_ARG_INFO()
289 
290 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str, 0, 3, IS_STRING, 0)
291 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
292 	ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
293 	ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
294 ZEND_END_ARG_INFO()
295 
296 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, 0, 2, _IS_BOOL, 0)
297 	ZEND_ARG_TYPE_INFO(0, hash, IS_STRING, 0)
298 	ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
299 ZEND_END_ARG_INFO()
300 #endif
301 
302 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult, 0, 2, IS_STRING, 0)
303 	ZEND_ARG_TYPE_INFO(0, n, IS_STRING, 0)
304 	ZEND_ARG_TYPE_INFO(0, p, IS_STRING, 0)
305 ZEND_END_ARG_INFO()
306 
307 #if defined(crypto_core_ristretto255_HASHBYTES)
308 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult_ristretto255, 0, 2, IS_STRING, 0)
309 	ZEND_ARG_TYPE_INFO(0, n, IS_STRING, 0)
310 	ZEND_ARG_TYPE_INFO(0, p, IS_STRING, 0)
311 ZEND_END_ARG_INFO()
312 
313 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult_ristretto255_base, 0, 1, IS_STRING, 0)
314 	ZEND_ARG_TYPE_INFO(0, n, IS_STRING, 0)
315 ZEND_END_ARG_INFO()
316 #endif
317 
318 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretbox, 0, 3, IS_STRING, 0)
319 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
320 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
321 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
322 ZEND_END_ARG_INFO()
323 
324 #define arginfo_sodium_crypto_secretbox_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
325 
326 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretbox_open, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
327 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
328 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
329 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
330 ZEND_END_ARG_INFO()
331 
332 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
333 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen, 0, 0, IS_STRING, 0)
334 ZEND_END_ARG_INFO()
335 
336 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push, 0, 1, IS_ARRAY, 0)
337 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
338 ZEND_END_ARG_INFO()
339 
340 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_push, 0, 2, IS_STRING, 0)
341 	ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
342 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
343 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_data, IS_STRING, 0, "\"\"")
344 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tag, IS_LONG, 0, "SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE")
345 ZEND_END_ARG_INFO()
346 
347 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull, 0, 2, IS_STRING, 0)
348 	ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0)
349 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
350 ZEND_END_ARG_INFO()
351 
352 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
353 	ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
354 	ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
355 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_data, IS_STRING, 0, "\"\"")
356 ZEND_END_ARG_INFO()
357 
358 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey, 0, 1, IS_VOID, 0)
359 	ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
360 ZEND_END_ARG_INFO()
361 #endif
362 
363 #define arginfo_sodium_crypto_shorthash arginfo_sodium_crypto_auth
364 
365 #define arginfo_sodium_crypto_shorthash_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
366 
367 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_sign, 0, 2, IS_STRING, 0)
368 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
369 	ZEND_ARG_TYPE_INFO(0, secret_key, IS_STRING, 0)
370 ZEND_END_ARG_INFO()
371 
372 #define arginfo_sodium_crypto_sign_detached arginfo_sodium_crypto_sign
373 
374 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519, 0, 1, IS_STRING, 0)
375 	ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
376 ZEND_END_ARG_INFO()
377 
378 #define arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519 arginfo_sodium_crypto_box_publickey_from_secretkey
379 
380 #define arginfo_sodium_crypto_sign_keypair arginfo_sodium_crypto_aead_chacha20poly1305_keygen
381 
382 #define arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey
383 
384 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_sign_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
385 	ZEND_ARG_TYPE_INFO(0, signed_message, IS_STRING, 0)
386 	ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
387 ZEND_END_ARG_INFO()
388 
389 #define arginfo_sodium_crypto_sign_publickey arginfo_sodium_crypto_box_publickey
390 
391 #define arginfo_sodium_crypto_sign_secretkey arginfo_sodium_crypto_box_publickey
392 
393 #define arginfo_sodium_crypto_sign_publickey_from_secretkey arginfo_sodium_crypto_box_publickey_from_secretkey
394 
395 #define arginfo_sodium_crypto_sign_seed_keypair arginfo_sodium_crypto_box_seed_keypair
396 
397 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_sign_verify_detached, 0, 3, _IS_BOOL, 0)
398 	ZEND_ARG_TYPE_INFO(0, signature, IS_STRING, 0)
399 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
400 	ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
401 ZEND_END_ARG_INFO()
402 
403 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream, 0, 3, IS_STRING, 0)
404 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
405 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
406 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
407 ZEND_END_ARG_INFO()
408 
409 #define arginfo_sodium_crypto_stream_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
410 
411 #define arginfo_sodium_crypto_stream_xor arginfo_sodium_crypto_secretbox
412 
413 #if defined(crypto_stream_xchacha20_KEYBYTES)
414 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream_xchacha20, 0, 3, IS_STRING, 0)
415 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
416 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
417 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
418 ZEND_END_ARG_INFO()
419 
420 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream_xchacha20_keygen, 0, 0, IS_STRING, 0)
421 ZEND_END_ARG_INFO()
422 
423 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream_xchacha20_xor, 0, 3, IS_STRING, 0)
424 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
425 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
426 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
427 ZEND_END_ARG_INFO()
428 
429 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream_xchacha20_xor_ic, 0, 4, IS_STRING, 0)
430 	ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
431 	ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
432 	ZEND_ARG_TYPE_INFO(0, counter, IS_LONG, 0)
433 	ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
434 ZEND_END_ARG_INFO()
435 #endif
436 
437 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_add, 0, 2, IS_VOID, 0)
438 	ZEND_ARG_TYPE_INFO(1, string1, IS_STRING, 0)
439 	ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
440 ZEND_END_ARG_INFO()
441 
442 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_compare, 0, 2, IS_LONG, 0)
443 	ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0)
444 	ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
445 ZEND_END_ARG_INFO()
446 
447 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_increment, 0, 1, IS_VOID, 0)
448 	ZEND_ARG_TYPE_INFO(1, string, IS_STRING, 0)
449 ZEND_END_ARG_INFO()
450 
451 #define arginfo_sodium_memcmp arginfo_sodium_compare
452 
453 #define arginfo_sodium_memzero arginfo_sodium_increment
454 
455 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_pad, 0, 2, IS_STRING, 0)
456 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
457 	ZEND_ARG_TYPE_INFO(0, block_size, IS_LONG, 0)
458 ZEND_END_ARG_INFO()
459 
460 #define arginfo_sodium_unpad arginfo_sodium_pad
461 
462 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_bin2hex, 0, 1, IS_STRING, 0)
463 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
464 ZEND_END_ARG_INFO()
465 
466 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_hex2bin, 0, 1, IS_STRING, 0)
467 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
468 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\"\"")
469 ZEND_END_ARG_INFO()
470 
471 #if defined(sodium_base64_VARIANT_ORIGINAL)
472 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_bin2base64, 0, 2, IS_STRING, 0)
473 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
474 	ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0)
475 ZEND_END_ARG_INFO()
476 
477 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_base642bin, 0, 2, IS_STRING, 0)
478 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
479 	ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0)
480 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\"\"")
481 ZEND_END_ARG_INFO()
482 #endif
483 
484 #define arginfo_sodium_crypto_scalarmult_base arginfo_sodium_crypto_box_publickey_from_secretkey
485 
486 ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_is_available);
487 #if defined(HAVE_AESGCM)
488 ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt);
489 ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_encrypt);
490 ZEND_FUNCTION(sodium_crypto_aead_aes256gcm_keygen);
491 #endif
492 #if defined(crypto_aead_aegis128l_KEYBYTES)
493 ZEND_FUNCTION(sodium_crypto_aead_aegis128l_decrypt);
494 ZEND_FUNCTION(sodium_crypto_aead_aegis128l_encrypt);
495 ZEND_FUNCTION(sodium_crypto_aead_aegis128l_keygen);
496 #endif
497 #if defined(crypto_aead_aegis256_KEYBYTES)
498 ZEND_FUNCTION(sodium_crypto_aead_aegis256_decrypt);
499 ZEND_FUNCTION(sodium_crypto_aead_aegis256_encrypt);
500 ZEND_FUNCTION(sodium_crypto_aead_aegis256_keygen);
501 #endif
502 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_decrypt);
503 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_encrypt);
504 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_keygen);
505 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_decrypt);
506 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_encrypt);
507 ZEND_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_keygen);
508 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
509 ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt);
510 ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_keygen);
511 ZEND_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt);
512 #endif
513 ZEND_FUNCTION(sodium_crypto_auth);
514 ZEND_FUNCTION(sodium_crypto_auth_keygen);
515 ZEND_FUNCTION(sodium_crypto_auth_verify);
516 ZEND_FUNCTION(sodium_crypto_box);
517 ZEND_FUNCTION(sodium_crypto_box_keypair);
518 ZEND_FUNCTION(sodium_crypto_box_seed_keypair);
519 ZEND_FUNCTION(sodium_crypto_box_keypair_from_secretkey_and_publickey);
520 ZEND_FUNCTION(sodium_crypto_box_open);
521 ZEND_FUNCTION(sodium_crypto_box_publickey);
522 ZEND_FUNCTION(sodium_crypto_box_publickey_from_secretkey);
523 ZEND_FUNCTION(sodium_crypto_box_seal);
524 ZEND_FUNCTION(sodium_crypto_box_seal_open);
525 ZEND_FUNCTION(sodium_crypto_box_secretkey);
526 #if defined(crypto_core_ristretto255_HASHBYTES)
527 ZEND_FUNCTION(sodium_crypto_core_ristretto255_add);
528 ZEND_FUNCTION(sodium_crypto_core_ristretto255_from_hash);
529 ZEND_FUNCTION(sodium_crypto_core_ristretto255_is_valid_point);
530 ZEND_FUNCTION(sodium_crypto_core_ristretto255_random);
531 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_add);
532 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_complement);
533 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_invert);
534 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_mul);
535 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_negate);
536 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_random);
537 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_reduce);
538 ZEND_FUNCTION(sodium_crypto_core_ristretto255_scalar_sub);
539 ZEND_FUNCTION(sodium_crypto_core_ristretto255_sub);
540 #endif
541 ZEND_FUNCTION(sodium_crypto_kx_keypair);
542 ZEND_FUNCTION(sodium_crypto_kx_publickey);
543 ZEND_FUNCTION(sodium_crypto_kx_secretkey);
544 ZEND_FUNCTION(sodium_crypto_kx_seed_keypair);
545 ZEND_FUNCTION(sodium_crypto_kx_client_session_keys);
546 ZEND_FUNCTION(sodium_crypto_kx_server_session_keys);
547 ZEND_FUNCTION(sodium_crypto_generichash);
548 ZEND_FUNCTION(sodium_crypto_generichash_keygen);
549 ZEND_FUNCTION(sodium_crypto_generichash_init);
550 ZEND_FUNCTION(sodium_crypto_generichash_update);
551 ZEND_FUNCTION(sodium_crypto_generichash_final);
552 ZEND_FUNCTION(sodium_crypto_kdf_derive_from_key);
553 ZEND_FUNCTION(sodium_crypto_kdf_keygen);
554 #if defined(crypto_pwhash_SALTBYTES)
555 ZEND_FUNCTION(sodium_crypto_pwhash);
556 ZEND_FUNCTION(sodium_crypto_pwhash_str);
557 ZEND_FUNCTION(sodium_crypto_pwhash_str_verify);
558 #endif
559 #if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
560 ZEND_FUNCTION(sodium_crypto_pwhash_str_needs_rehash);
561 #endif
562 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
563 ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256);
564 ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str);
565 ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify);
566 #endif
567 ZEND_FUNCTION(sodium_crypto_scalarmult);
568 #if defined(crypto_core_ristretto255_HASHBYTES)
569 ZEND_FUNCTION(sodium_crypto_scalarmult_ristretto255);
570 ZEND_FUNCTION(sodium_crypto_scalarmult_ristretto255_base);
571 #endif
572 ZEND_FUNCTION(sodium_crypto_secretbox);
573 ZEND_FUNCTION(sodium_crypto_secretbox_keygen);
574 ZEND_FUNCTION(sodium_crypto_secretbox_open);
575 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
576 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen);
577 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push);
578 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push);
579 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull);
580 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull);
581 ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey);
582 #endif
583 ZEND_FUNCTION(sodium_crypto_shorthash);
584 ZEND_FUNCTION(sodium_crypto_shorthash_keygen);
585 ZEND_FUNCTION(sodium_crypto_sign);
586 ZEND_FUNCTION(sodium_crypto_sign_detached);
587 ZEND_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519);
588 ZEND_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519);
589 ZEND_FUNCTION(sodium_crypto_sign_keypair);
590 ZEND_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey);
591 ZEND_FUNCTION(sodium_crypto_sign_open);
592 ZEND_FUNCTION(sodium_crypto_sign_publickey);
593 ZEND_FUNCTION(sodium_crypto_sign_secretkey);
594 ZEND_FUNCTION(sodium_crypto_sign_publickey_from_secretkey);
595 ZEND_FUNCTION(sodium_crypto_sign_seed_keypair);
596 ZEND_FUNCTION(sodium_crypto_sign_verify_detached);
597 ZEND_FUNCTION(sodium_crypto_stream);
598 ZEND_FUNCTION(sodium_crypto_stream_keygen);
599 ZEND_FUNCTION(sodium_crypto_stream_xor);
600 #if defined(crypto_stream_xchacha20_KEYBYTES)
601 ZEND_FUNCTION(sodium_crypto_stream_xchacha20);
602 ZEND_FUNCTION(sodium_crypto_stream_xchacha20_keygen);
603 ZEND_FUNCTION(sodium_crypto_stream_xchacha20_xor);
604 ZEND_FUNCTION(sodium_crypto_stream_xchacha20_xor_ic);
605 #endif
606 ZEND_FUNCTION(sodium_add);
607 ZEND_FUNCTION(sodium_compare);
608 ZEND_FUNCTION(sodium_increment);
609 ZEND_FUNCTION(sodium_memcmp);
610 ZEND_FUNCTION(sodium_memzero);
611 ZEND_FUNCTION(sodium_pad);
612 ZEND_FUNCTION(sodium_unpad);
613 ZEND_FUNCTION(sodium_bin2hex);
614 ZEND_FUNCTION(sodium_hex2bin);
615 #if defined(sodium_base64_VARIANT_ORIGINAL)
616 ZEND_FUNCTION(sodium_bin2base64);
617 ZEND_FUNCTION(sodium_base642bin);
618 #endif
619 
620 static const zend_function_entry ext_functions[] = {
621 	ZEND_FE(sodium_crypto_aead_aes256gcm_is_available, arginfo_sodium_crypto_aead_aes256gcm_is_available)
622 #if defined(HAVE_AESGCM)
623 	ZEND_FE(sodium_crypto_aead_aes256gcm_decrypt, arginfo_sodium_crypto_aead_aes256gcm_decrypt)
624 	ZEND_FE(sodium_crypto_aead_aes256gcm_encrypt, arginfo_sodium_crypto_aead_aes256gcm_encrypt)
625 	ZEND_FE(sodium_crypto_aead_aes256gcm_keygen, arginfo_sodium_crypto_aead_aes256gcm_keygen)
626 #endif
627 #if defined(crypto_aead_aegis128l_KEYBYTES)
628 	ZEND_FE(sodium_crypto_aead_aegis128l_decrypt, arginfo_sodium_crypto_aead_aegis128l_decrypt)
629 	ZEND_FE(sodium_crypto_aead_aegis128l_encrypt, arginfo_sodium_crypto_aead_aegis128l_encrypt)
630 	ZEND_FE(sodium_crypto_aead_aegis128l_keygen, arginfo_sodium_crypto_aead_aegis128l_keygen)
631 #endif
632 #if defined(crypto_aead_aegis256_KEYBYTES)
633 	ZEND_FE(sodium_crypto_aead_aegis256_decrypt, arginfo_sodium_crypto_aead_aegis256_decrypt)
634 	ZEND_FE(sodium_crypto_aead_aegis256_encrypt, arginfo_sodium_crypto_aead_aegis256_encrypt)
635 	ZEND_FE(sodium_crypto_aead_aegis256_keygen, arginfo_sodium_crypto_aead_aegis256_keygen)
636 #endif
637 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_decrypt)
638 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_encrypt)
639 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_keygen)
640 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt)
641 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt)
642 	ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen)
643 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
644 	ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt)
645 	ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen)
646 	ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt)
647 #endif
648 	ZEND_FE(sodium_crypto_auth, arginfo_sodium_crypto_auth)
649 	ZEND_FE(sodium_crypto_auth_keygen, arginfo_sodium_crypto_auth_keygen)
650 	ZEND_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify)
651 	ZEND_FE(sodium_crypto_box, arginfo_sodium_crypto_box)
652 	ZEND_FE(sodium_crypto_box_keypair, arginfo_sodium_crypto_box_keypair)
653 	ZEND_FE(sodium_crypto_box_seed_keypair, arginfo_sodium_crypto_box_seed_keypair)
654 	ZEND_FE(sodium_crypto_box_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey)
655 	ZEND_FE(sodium_crypto_box_open, arginfo_sodium_crypto_box_open)
656 	ZEND_FE(sodium_crypto_box_publickey, arginfo_sodium_crypto_box_publickey)
657 	ZEND_FE(sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_box_publickey_from_secretkey)
658 	ZEND_FE(sodium_crypto_box_seal, arginfo_sodium_crypto_box_seal)
659 	ZEND_FE(sodium_crypto_box_seal_open, arginfo_sodium_crypto_box_seal_open)
660 	ZEND_FE(sodium_crypto_box_secretkey, arginfo_sodium_crypto_box_secretkey)
661 #if defined(crypto_core_ristretto255_HASHBYTES)
662 	ZEND_FE(sodium_crypto_core_ristretto255_add, arginfo_sodium_crypto_core_ristretto255_add)
663 	ZEND_FE(sodium_crypto_core_ristretto255_from_hash, arginfo_sodium_crypto_core_ristretto255_from_hash)
664 	ZEND_FE(sodium_crypto_core_ristretto255_is_valid_point, arginfo_sodium_crypto_core_ristretto255_is_valid_point)
665 	ZEND_FE(sodium_crypto_core_ristretto255_random, arginfo_sodium_crypto_core_ristretto255_random)
666 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_add, arginfo_sodium_crypto_core_ristretto255_scalar_add)
667 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_complement, arginfo_sodium_crypto_core_ristretto255_scalar_complement)
668 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_invert, arginfo_sodium_crypto_core_ristretto255_scalar_invert)
669 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_mul, arginfo_sodium_crypto_core_ristretto255_scalar_mul)
670 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_negate, arginfo_sodium_crypto_core_ristretto255_scalar_negate)
671 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_random, arginfo_sodium_crypto_core_ristretto255_scalar_random)
672 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_reduce, arginfo_sodium_crypto_core_ristretto255_scalar_reduce)
673 	ZEND_FE(sodium_crypto_core_ristretto255_scalar_sub, arginfo_sodium_crypto_core_ristretto255_scalar_sub)
674 	ZEND_FE(sodium_crypto_core_ristretto255_sub, arginfo_sodium_crypto_core_ristretto255_sub)
675 #endif
676 	ZEND_FE(sodium_crypto_kx_keypair, arginfo_sodium_crypto_kx_keypair)
677 	ZEND_FE(sodium_crypto_kx_publickey, arginfo_sodium_crypto_kx_publickey)
678 	ZEND_FE(sodium_crypto_kx_secretkey, arginfo_sodium_crypto_kx_secretkey)
679 	ZEND_FE(sodium_crypto_kx_seed_keypair, arginfo_sodium_crypto_kx_seed_keypair)
680 	ZEND_FE(sodium_crypto_kx_client_session_keys, arginfo_sodium_crypto_kx_client_session_keys)
681 	ZEND_FE(sodium_crypto_kx_server_session_keys, arginfo_sodium_crypto_kx_server_session_keys)
682 	ZEND_FE(sodium_crypto_generichash, arginfo_sodium_crypto_generichash)
683 	ZEND_FE(sodium_crypto_generichash_keygen, arginfo_sodium_crypto_generichash_keygen)
684 	ZEND_FE(sodium_crypto_generichash_init, arginfo_sodium_crypto_generichash_init)
685 	ZEND_FE(sodium_crypto_generichash_update, arginfo_sodium_crypto_generichash_update)
686 	ZEND_FE(sodium_crypto_generichash_final, arginfo_sodium_crypto_generichash_final)
687 	ZEND_FE(sodium_crypto_kdf_derive_from_key, arginfo_sodium_crypto_kdf_derive_from_key)
688 	ZEND_FE(sodium_crypto_kdf_keygen, arginfo_sodium_crypto_kdf_keygen)
689 #if defined(crypto_pwhash_SALTBYTES)
690 	ZEND_FE(sodium_crypto_pwhash, arginfo_sodium_crypto_pwhash)
691 	ZEND_FE(sodium_crypto_pwhash_str, arginfo_sodium_crypto_pwhash_str)
692 	ZEND_FE(sodium_crypto_pwhash_str_verify, arginfo_sodium_crypto_pwhash_str_verify)
693 #endif
694 #if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
695 	ZEND_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash)
696 #endif
697 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
698 	ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256)
699 	ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str)
700 	ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify)
701 #endif
702 	ZEND_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult)
703 #if defined(crypto_core_ristretto255_HASHBYTES)
704 	ZEND_FE(sodium_crypto_scalarmult_ristretto255, arginfo_sodium_crypto_scalarmult_ristretto255)
705 	ZEND_FE(sodium_crypto_scalarmult_ristretto255_base, arginfo_sodium_crypto_scalarmult_ristretto255_base)
706 #endif
707 	ZEND_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox)
708 	ZEND_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen)
709 	ZEND_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open)
710 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
711 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen)
712 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push)
713 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push)
714 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull)
715 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull)
716 	ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey)
717 #endif
718 	ZEND_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash)
719 	ZEND_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen)
720 	ZEND_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign)
721 	ZEND_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached)
722 	ZEND_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519)
723 	ZEND_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519)
724 	ZEND_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair)
725 	ZEND_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey)
726 	ZEND_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open)
727 	ZEND_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey)
728 	ZEND_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey)
729 	ZEND_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey)
730 	ZEND_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair)
731 	ZEND_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached)
732 	ZEND_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream)
733 	ZEND_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen)
734 	ZEND_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor)
735 #if defined(crypto_stream_xchacha20_KEYBYTES)
736 	ZEND_FE(sodium_crypto_stream_xchacha20, arginfo_sodium_crypto_stream_xchacha20)
737 	ZEND_FE(sodium_crypto_stream_xchacha20_keygen, arginfo_sodium_crypto_stream_xchacha20_keygen)
738 	ZEND_FE(sodium_crypto_stream_xchacha20_xor, arginfo_sodium_crypto_stream_xchacha20_xor)
739 	ZEND_FE(sodium_crypto_stream_xchacha20_xor_ic, arginfo_sodium_crypto_stream_xchacha20_xor_ic)
740 #endif
741 	ZEND_FE(sodium_add, arginfo_sodium_add)
742 	ZEND_FE(sodium_compare, arginfo_sodium_compare)
743 	ZEND_FE(sodium_increment, arginfo_sodium_increment)
744 	ZEND_FE(sodium_memcmp, arginfo_sodium_memcmp)
745 	ZEND_FE(sodium_memzero, arginfo_sodium_memzero)
746 	ZEND_FE(sodium_pad, arginfo_sodium_pad)
747 	ZEND_FE(sodium_unpad, arginfo_sodium_unpad)
748 	ZEND_FE(sodium_bin2hex, arginfo_sodium_bin2hex)
749 	ZEND_FE(sodium_hex2bin, arginfo_sodium_hex2bin)
750 #if defined(sodium_base64_VARIANT_ORIGINAL)
751 	ZEND_FE(sodium_bin2base64, arginfo_sodium_bin2base64)
752 	ZEND_FE(sodium_base642bin, arginfo_sodium_base642bin)
753 #endif
754 	ZEND_RAW_FENTRY("sodium_crypto_scalarmult_base", zif_sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base, 0, NULL, NULL)
755 	ZEND_FE_END
756 };
757 
register_libsodium_symbols(int module_number)758 static void register_libsodium_symbols(int module_number)
759 {
760 	REGISTER_STRING_CONSTANT("SODIUM_LIBRARY_VERSION", SODIUM_LIBRARY_VERSION(), CONST_PERSISTENT);
761 	REGISTER_LONG_CONSTANT("SODIUM_LIBRARY_MAJOR_VERSION", sodium_library_version_major(), CONST_PERSISTENT);
762 	REGISTER_LONG_CONSTANT("SODIUM_LIBRARY_MINOR_VERSION", sodium_library_version_minor(), CONST_PERSISTENT);
763 #if defined(HAVE_AESGCM)
764 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES", crypto_aead_aes256gcm_KEYBYTES, CONST_PERSISTENT);
765 #endif
766 #if defined(HAVE_AESGCM)
767 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES", crypto_aead_aes256gcm_NSECBYTES, CONST_PERSISTENT);
768 #endif
769 #if defined(HAVE_AESGCM)
770 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES", crypto_aead_aes256gcm_NPUBBYTES, CONST_PERSISTENT);
771 #endif
772 #if defined(HAVE_AESGCM)
773 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AES256GCM_ABYTES", crypto_aead_aes256gcm_ABYTES, CONST_PERSISTENT);
774 #endif
775 #if defined(crypto_aead_aegis128l_KEYBYTES)
776 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES", crypto_aead_aegis128l_KEYBYTES, CONST_PERSISTENT);
777 #endif
778 #if defined(crypto_aead_aegis128l_KEYBYTES)
779 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES", crypto_aead_aegis128l_NSECBYTES, CONST_PERSISTENT);
780 #endif
781 #if defined(crypto_aead_aegis128l_KEYBYTES)
782 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES", crypto_aead_aegis128l_NPUBBYTES, CONST_PERSISTENT);
783 #endif
784 #if defined(crypto_aead_aegis128l_KEYBYTES)
785 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES", crypto_aead_aegis128l_ABYTES, CONST_PERSISTENT);
786 #endif
787 #if defined(crypto_aead_aegis256_KEYBYTES)
788 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES", crypto_aead_aegis256_KEYBYTES, CONST_PERSISTENT);
789 #endif
790 #if defined(crypto_aead_aegis256_KEYBYTES)
791 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES", crypto_aead_aegis256_NSECBYTES, CONST_PERSISTENT);
792 #endif
793 #if defined(crypto_aead_aegis256_KEYBYTES)
794 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES", crypto_aead_aegis256_NPUBBYTES, CONST_PERSISTENT);
795 #endif
796 #if defined(crypto_aead_aegis256_KEYBYTES)
797 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES", crypto_aead_aegis256_ABYTES, CONST_PERSISTENT);
798 #endif
799 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES", crypto_aead_chacha20poly1305_KEYBYTES, CONST_PERSISTENT);
800 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES", crypto_aead_chacha20poly1305_NSECBYTES, CONST_PERSISTENT);
801 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES", crypto_aead_chacha20poly1305_NPUBBYTES, CONST_PERSISTENT);
802 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTES", crypto_aead_chacha20poly1305_ABYTES, CONST_PERSISTENT);
803 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES", crypto_aead_chacha20poly1305_IETF_KEYBYTES, CONST_PERSISTENT);
804 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES", crypto_aead_chacha20poly1305_IETF_NSECBYTES, CONST_PERSISTENT);
805 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES", crypto_aead_chacha20poly1305_IETF_NPUBBYTES, CONST_PERSISTENT);
806 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES", crypto_aead_chacha20poly1305_IETF_ABYTES, CONST_PERSISTENT);
807 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
808 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES", crypto_aead_xchacha20poly1305_IETF_KEYBYTES, CONST_PERSISTENT);
809 #endif
810 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
811 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES", crypto_aead_xchacha20poly1305_IETF_NSECBYTES, CONST_PERSISTENT);
812 #endif
813 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
814 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES", crypto_aead_xchacha20poly1305_IETF_NPUBBYTES, CONST_PERSISTENT);
815 #endif
816 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
817 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES", crypto_aead_xchacha20poly1305_IETF_ABYTES, CONST_PERSISTENT);
818 #endif
819 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AUTH_BYTES", crypto_auth_BYTES, CONST_PERSISTENT);
820 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_AUTH_KEYBYTES", crypto_auth_KEYBYTES, CONST_PERSISTENT);
821 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_SEALBYTES", crypto_box_SEALBYTES, CONST_PERSISTENT);
822 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_SECRETKEYBYTES", crypto_box_SECRETKEYBYTES, CONST_PERSISTENT);
823 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_PUBLICKEYBYTES", crypto_box_PUBLICKEYBYTES, CONST_PERSISTENT);
824 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_KEYPAIRBYTES", SODIUM_CRYPTO_BOX_KEYPAIRBYTES(), CONST_PERSISTENT);
825 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_MACBYTES", crypto_box_MACBYTES, CONST_PERSISTENT);
826 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_NONCEBYTES", crypto_box_NONCEBYTES, CONST_PERSISTENT);
827 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_BOX_SEEDBYTES", crypto_box_SEEDBYTES, CONST_PERSISTENT);
828 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KDF_BYTES_MIN", crypto_kdf_BYTES_MIN, CONST_PERSISTENT);
829 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KDF_BYTES_MAX", crypto_kdf_BYTES_MAX, CONST_PERSISTENT);
830 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KDF_CONTEXTBYTES", crypto_kdf_CONTEXTBYTES, CONST_PERSISTENT);
831 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KDF_KEYBYTES", crypto_kdf_KEYBYTES, CONST_PERSISTENT);
832 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KX_SEEDBYTES", crypto_kx_SEEDBYTES, CONST_PERSISTENT);
833 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KX_SESSIONKEYBYTES", crypto_kx_SESSIONKEYBYTES, CONST_PERSISTENT);
834 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KX_PUBLICKEYBYTES", crypto_kx_PUBLICKEYBYTES, CONST_PERSISTENT);
835 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KX_SECRETKEYBYTES", crypto_kx_SECRETKEYBYTES, CONST_PERSISTENT);
836 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_KX_KEYPAIRBYTES", SODIUM_CRYPTO_KX_KEYPAIRBYTES(), CONST_PERSISTENT);
837 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
838 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES", crypto_secretstream_xchacha20poly1305_ABYTES, CONST_PERSISTENT);
839 #endif
840 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
841 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES", crypto_secretstream_xchacha20poly1305_HEADERBYTES, CONST_PERSISTENT);
842 #endif
843 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
844 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES", crypto_secretstream_xchacha20poly1305_KEYBYTES, CONST_PERSISTENT);
845 #endif
846 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
847 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX", crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX, CONST_PERSISTENT);
848 #endif
849 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
850 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE", crypto_secretstream_xchacha20poly1305_TAG_MESSAGE, CONST_PERSISTENT);
851 #endif
852 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
853 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH", crypto_secretstream_xchacha20poly1305_TAG_PUSH, CONST_PERSISTENT);
854 #endif
855 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
856 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY", crypto_secretstream_xchacha20poly1305_TAG_REKEY, CONST_PERSISTENT);
857 #endif
858 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
859 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL", crypto_secretstream_xchacha20poly1305_TAG_FINAL, CONST_PERSISTENT);
860 #endif
861 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_BYTES", crypto_generichash_BYTES, CONST_PERSISTENT);
862 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_BYTES_MIN", crypto_generichash_BYTES_MIN, CONST_PERSISTENT);
863 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_BYTES_MAX", crypto_generichash_BYTES_MAX, CONST_PERSISTENT);
864 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_KEYBYTES", crypto_generichash_KEYBYTES, CONST_PERSISTENT);
865 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MIN", crypto_generichash_KEYBYTES_MIN, CONST_PERSISTENT);
866 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX", crypto_generichash_KEYBYTES_MAX, CONST_PERSISTENT);
867 #if defined(crypto_pwhash_SALTBYTES)
868 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13", crypto_pwhash_ALG_ARGON2I13, CONST_PERSISTENT);
869 #endif
870 #if defined(crypto_pwhash_SALTBYTES) && defined(crypto_pwhash_ALG_ARGON2ID13)
871 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13", crypto_pwhash_ALG_ARGON2ID13, CONST_PERSISTENT);
872 #endif
873 #if defined(crypto_pwhash_SALTBYTES)
874 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_ALG_DEFAULT", crypto_pwhash_ALG_DEFAULT, CONST_PERSISTENT);
875 #endif
876 #if defined(crypto_pwhash_SALTBYTES)
877 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SALTBYTES", crypto_pwhash_SALTBYTES, CONST_PERSISTENT);
878 #endif
879 #if defined(crypto_pwhash_SALTBYTES)
880 	REGISTER_STRING_CONSTANT("SODIUM_CRYPTO_PWHASH_STRPREFIX", crypto_pwhash_STRPREFIX, CONST_PERSISTENT);
881 #endif
882 #if defined(crypto_pwhash_SALTBYTES)
883 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE", crypto_pwhash_opslimit_interactive(), CONST_PERSISTENT);
884 #endif
885 #if defined(crypto_pwhash_SALTBYTES)
886 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE", crypto_pwhash_memlimit_interactive(), CONST_PERSISTENT);
887 #endif
888 #if defined(crypto_pwhash_SALTBYTES)
889 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE", crypto_pwhash_opslimit_moderate(), CONST_PERSISTENT);
890 #endif
891 #if defined(crypto_pwhash_SALTBYTES)
892 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE", crypto_pwhash_memlimit_moderate(), CONST_PERSISTENT);
893 #endif
894 #if defined(crypto_pwhash_SALTBYTES)
895 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE", crypto_pwhash_opslimit_sensitive(), CONST_PERSISTENT);
896 #endif
897 #if defined(crypto_pwhash_SALTBYTES)
898 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE", crypto_pwhash_memlimit_sensitive(), CONST_PERSISTENT);
899 #endif
900 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
901 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES", crypto_pwhash_scryptsalsa208sha256_SALTBYTES, CONST_PERSISTENT);
902 #endif
903 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
904 	REGISTER_STRING_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX", crypto_pwhash_scryptsalsa208sha256_STRPREFIX, CONST_PERSISTENT);
905 #endif
906 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
907 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE", crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(), CONST_PERSISTENT);
908 #endif
909 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
910 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE", crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(), CONST_PERSISTENT);
911 #endif
912 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
913 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE", crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(), CONST_PERSISTENT);
914 #endif
915 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
916 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE", crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive(), CONST_PERSISTENT);
917 #endif
918 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SCALARMULT_BYTES", crypto_scalarmult_BYTES, CONST_PERSISTENT);
919 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SCALARMULT_SCALARBYTES", crypto_scalarmult_SCALARBYTES, CONST_PERSISTENT);
920 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SHORTHASH_BYTES", crypto_shorthash_BYTES, CONST_PERSISTENT);
921 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SHORTHASH_KEYBYTES", crypto_shorthash_KEYBYTES, CONST_PERSISTENT);
922 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETBOX_KEYBYTES", crypto_secretbox_KEYBYTES, CONST_PERSISTENT);
923 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETBOX_MACBYTES", crypto_secretbox_MACBYTES, CONST_PERSISTENT);
924 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SECRETBOX_NONCEBYTES", crypto_secretbox_NONCEBYTES, CONST_PERSISTENT);
925 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SIGN_BYTES", crypto_sign_BYTES, CONST_PERSISTENT);
926 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SIGN_SEEDBYTES", crypto_sign_SEEDBYTES, CONST_PERSISTENT);
927 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES", crypto_sign_PUBLICKEYBYTES, CONST_PERSISTENT);
928 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SIGN_SECRETKEYBYTES", crypto_sign_SECRETKEYBYTES, CONST_PERSISTENT);
929 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SIGN_KEYPAIRBYTES", SODIUM_CRYPTO_SIGN_KEYPAIRBYTES(), CONST_PERSISTENT);
930 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_STREAM_NONCEBYTES", crypto_stream_NONCEBYTES, CONST_PERSISTENT);
931 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_STREAM_KEYBYTES", crypto_stream_KEYBYTES, CONST_PERSISTENT);
932 #if defined(crypto_stream_xchacha20_KEYBYTES)
933 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES", crypto_stream_xchacha20_NONCEBYTES, CONST_PERSISTENT);
934 #endif
935 #if defined(crypto_stream_xchacha20_KEYBYTES)
936 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES", crypto_stream_xchacha20_KEYBYTES, CONST_PERSISTENT);
937 #endif
938 #if defined(sodium_base64_VARIANT_ORIGINAL)
939 	REGISTER_LONG_CONSTANT("SODIUM_BASE64_VARIANT_ORIGINAL", sodium_base64_VARIANT_ORIGINAL, CONST_PERSISTENT);
940 #endif
941 #if defined(sodium_base64_VARIANT_ORIGINAL)
942 	REGISTER_LONG_CONSTANT("SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING", sodium_base64_VARIANT_ORIGINAL_NO_PADDING, CONST_PERSISTENT);
943 #endif
944 #if defined(sodium_base64_VARIANT_ORIGINAL)
945 	REGISTER_LONG_CONSTANT("SODIUM_BASE64_VARIANT_URLSAFE", sodium_base64_VARIANT_URLSAFE, CONST_PERSISTENT);
946 #endif
947 #if defined(sodium_base64_VARIANT_ORIGINAL)
948 	REGISTER_LONG_CONSTANT("SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING", sodium_base64_VARIANT_URLSAFE_NO_PADDING, CONST_PERSISTENT);
949 #endif
950 #if defined(crypto_core_ristretto255_HASHBYTES)
951 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES", crypto_scalarmult_ristretto255_BYTES, CONST_PERSISTENT);
952 #endif
953 #if defined(crypto_core_ristretto255_HASHBYTES)
954 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES", crypto_scalarmult_ristretto255_SCALARBYTES, CONST_PERSISTENT);
955 #endif
956 #if defined(crypto_core_ristretto255_HASHBYTES)
957 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES", crypto_core_ristretto255_BYTES, CONST_PERSISTENT);
958 #endif
959 #if defined(crypto_core_ristretto255_HASHBYTES)
960 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES", crypto_core_ristretto255_HASHBYTES, CONST_PERSISTENT);
961 #endif
962 #if defined(crypto_core_ristretto255_HASHBYTES)
963 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES", crypto_core_ristretto255_SCALARBYTES, CONST_PERSISTENT);
964 #endif
965 #if defined(crypto_core_ristretto255_HASHBYTES)
966 	REGISTER_LONG_CONSTANT("SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES", crypto_core_ristretto255_NONREDUCEDSCALARBYTES, CONST_PERSISTENT);
967 #endif
968 
969 #if defined(HAVE_AESGCM)
970 
971 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_decrypt", sizeof("sodium_crypto_aead_aes256gcm_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
972 
973 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
974 
975 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
976 #endif
977 #if defined(crypto_aead_aegis128l_KEYBYTES)
978 
979 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_decrypt", sizeof("sodium_crypto_aead_aegis128l_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
980 
981 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
982 
983 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
984 #endif
985 #if defined(crypto_aead_aegis256_KEYBYTES)
986 
987 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_decrypt", sizeof("sodium_crypto_aead_aegis256_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
988 
989 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
990 
991 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
992 #endif
993 
994 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
995 
996 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
997 
998 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
999 
1000 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1001 
1002 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1003 
1004 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1005 #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
1006 
1007 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1008 
1009 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1010 
1011 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1012 #endif
1013 
1014 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth", sizeof("sodium_crypto_auth") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1015 
1016 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth_verify", sizeof("sodium_crypto_auth_verify") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1017 
1018 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1019 
1020 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1021 
1022 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seed_keypair", sizeof("sodium_crypto_box_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1023 
1024 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_box_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1025 
1026 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_open", sizeof("sodium_crypto_box_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1027 
1028 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey", sizeof("sodium_crypto_box_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1029 
1030 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey_from_secretkey", sizeof("sodium_crypto_box_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1031 
1032 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal", sizeof("sodium_crypto_box_seal") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1033 
1034 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal_open", sizeof("sodium_crypto_box_seal_open") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1035 
1036 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_secretkey", sizeof("sodium_crypto_box_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1037 
1038 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_publickey", sizeof("sodium_crypto_kx_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1039 
1040 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_secretkey", sizeof("sodium_crypto_kx_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1041 
1042 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_seed_keypair", sizeof("sodium_crypto_kx_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1043 
1044 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_client_session_keys", sizeof("sodium_crypto_kx_client_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1045 
1046 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_server_session_keys", sizeof("sodium_crypto_kx_server_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1047 
1048 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash", sizeof("sodium_crypto_generichash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1049 
1050 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash_init", sizeof("sodium_crypto_generichash_init") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1051 
1052 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kdf_derive_from_key", sizeof("sodium_crypto_kdf_derive_from_key") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1053 #if defined(crypto_pwhash_SALTBYTES)
1054 
1055 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash", sizeof("sodium_crypto_pwhash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1056 
1057 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str", sizeof("sodium_crypto_pwhash_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1058 
1059 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str_verify", sizeof("sodium_crypto_pwhash_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1060 #endif
1061 #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
1062 
1063 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1064 
1065 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1066 
1067 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str_verify", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1068 #endif
1069 
1070 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1071 
1072 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1073 
1074 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox_open", sizeof("sodium_crypto_secretbox_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1075 #if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
1076 
1077 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_push") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1078 
1079 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_push") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1080 
1081 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_pull", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_pull") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1082 #endif
1083 
1084 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_shorthash", sizeof("sodium_crypto_shorthash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1085 
1086 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign", sizeof("sodium_crypto_sign") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1087 
1088 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_detached", sizeof("sodium_crypto_sign_detached") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1089 
1090 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_ed25519_sk_to_curve25519", sizeof("sodium_crypto_sign_ed25519_sk_to_curve25519") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1091 
1092 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_sign_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1093 
1094 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey", sizeof("sodium_crypto_sign_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1095 
1096 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_secretkey", sizeof("sodium_crypto_sign_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1097 
1098 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey_from_secretkey", sizeof("sodium_crypto_sign_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1099 
1100 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_seed_keypair", sizeof("sodium_crypto_sign_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1101 
1102 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream", sizeof("sodium_crypto_stream") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1103 
1104 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1105 
1106 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1107 #if defined(crypto_stream_xchacha20_KEYBYTES)
1108 
1109 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20", sizeof("sodium_crypto_stream_xchacha20") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1110 
1111 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1112 
1113 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1114 
1115 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1116 
1117 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1118 #endif
1119 
1120 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1121 
1122 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1123 
1124 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1125 
1126 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1127 
1128 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memzero", sizeof("sodium_memzero") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1129 
1130 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_pad", sizeof("sodium_pad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1131 
1132 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_unpad", sizeof("sodium_unpad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1133 
1134 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_bin2hex", sizeof("sodium_bin2hex") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1135 
1136 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_hex2bin", sizeof("sodium_hex2bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1137 #if defined(sodium_base64_VARIANT_ORIGINAL)
1138 
1139 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_bin2base64", sizeof("sodium_bin2base64") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1140 
1141 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_base642bin", sizeof("sodium_base642bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1142 #endif
1143 
1144 	zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_scalarmult_base", sizeof("sodium_crypto_scalarmult_base") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
1145 }
1146 
register_class_SodiumException(zend_class_entry * class_entry_Exception)1147 static zend_class_entry *register_class_SodiumException(zend_class_entry *class_entry_Exception)
1148 {
1149 	zend_class_entry ce, *class_entry;
1150 
1151 	INIT_CLASS_ENTRY(ce, "SodiumException", NULL);
1152 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_Exception, 0);
1153 
1154 	return class_entry;
1155 }
1156