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