php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
libsodium_arginfo.h
Go to the documentation of this file.
1/* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: 89cbb449ee6146dc8d50ba4bb1e76f83444a2db2 */
3
4ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
6
7#if defined(HAVE_AESGCM)
8ZEND_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)
14
15ZEND_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)
21
22ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_keygen, 0, 0, IS_STRING, 0)
24#endif
25
26#if defined(crypto_aead_aegis128l_KEYBYTES)
27ZEND_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)
33
34ZEND_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)
40
41ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis128l_keygen, 0, 0, IS_STRING, 0)
43#endif
44
45#if defined(crypto_aead_aegis256_KEYBYTES)
46ZEND_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)
52
53ZEND_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)
59
60ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aegis256_keygen, 0, 0, IS_STRING, 0)
62#endif
63
64ZEND_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)
70
71ZEND_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)
77
78ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_chacha20poly1305_keygen, 0, 0, IS_STRING, 0)
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)
88ZEND_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)
94
95ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen, 0, 0, IS_STRING, 0)
97
98ZEND_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)
104#endif
105
106ZEND_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)
110
111#define arginfo_sodium_crypto_auth_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
112
113ZEND_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)
118
119ZEND_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)
124
125#define arginfo_sodium_crypto_box_keypair arginfo_sodium_crypto_aead_chacha20poly1305_keygen
126
127ZEND_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)
130
131ZEND_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)
135
136ZEND_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)
141
142ZEND_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)
145
146ZEND_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)
149
150ZEND_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)
154
155ZEND_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)
159
160#define arginfo_sodium_crypto_box_secretkey arginfo_sodium_crypto_box_publickey
161
162#if defined(crypto_core_ristretto255_HASHBYTES)
163ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_add, 0, 2, IS_STRING, 0)
167
168ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_from_hash, 0, 1, IS_STRING, 0)
171
172ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_is_valid_point, 0, 1, _IS_BOOL, 0)
175
176ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_random, 0, 0, IS_STRING, 0)
178
179ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_core_ristretto255_scalar_add, 0, 2, IS_STRING, 0)
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
209ZEND_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)
213
214ZEND_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)
218
219ZEND_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)
222 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
224
225#define arginfo_sodium_crypto_generichash_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
226
227ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_init, 0, 0, IS_STRING, 0)
229 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
231
232ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_update, 0, 2, IS_TRUE, 0)
234 ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
236
237ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_final, 0, 1, IS_STRING, 0)
239 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
241
242ZEND_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)
248
249#define arginfo_sodium_crypto_kdf_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
250
251#if defined(crypto_pwhash_SALTBYTES)
252ZEND_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")
260
261ZEND_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)
266
267ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_str_verify, 0, 2, _IS_BOOL, 0)
269 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
271#endif
272
273#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
274ZEND_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)
279#endif
280
281#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
282ZEND_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)
289
290ZEND_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)
295
296ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, 0, 2, _IS_BOOL, 0)
298 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
300#endif
301
302ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult, 0, 2, IS_STRING, 0)
306
307#if defined(crypto_core_ristretto255_HASHBYTES)
308ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult_ristretto255, 0, 2, IS_STRING, 0)
312
313ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult_ristretto255_base, 0, 1, IS_STRING, 0)
316#endif
317
318ZEND_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)
323
324#define arginfo_sodium_crypto_secretbox_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
325
326ZEND_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)
331
332#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
333ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen, 0, 0, IS_STRING, 0)
335
336ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push, 0, 1, IS_ARRAY, 0)
339
340ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_push, 0, 2, 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")
346
347ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull, 0, 2, IS_STRING, 0)
351
352ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
354 ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
355 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_data, IS_STRING, 0, "\"\"")
357
358ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey, 0, 1, IS_VOID, 0)
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
367ZEND_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)
371
372#define arginfo_sodium_crypto_sign_detached arginfo_sodium_crypto_sign
373
374ZEND_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)
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
384ZEND_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)
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
397ZEND_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)
402
403ZEND_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)
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)
414ZEND_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)
419
420ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_stream_xchacha20_keygen, 0, 0, IS_STRING, 0)
422
423ZEND_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)
428
429ZEND_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)
435#endif
436
437ZEND_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)
441
442ZEND_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)
446
447ZEND_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)
450
451#define arginfo_sodium_memcmp arginfo_sodium_compare
452
453#define arginfo_sodium_memzero arginfo_sodium_increment
454
455ZEND_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)
459
460#define arginfo_sodium_unpad arginfo_sodium_pad
461
462ZEND_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)
465
466ZEND_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)
470
471#if defined(sodium_base64_VARIANT_ORIGINAL)
472ZEND_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)
476
477ZEND_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)
482#endif
483
484#define arginfo_sodium_crypto_scalarmult_base arginfo_sodium_crypto_box_publickey_from_secretkey
485
487#if defined(HAVE_AESGCM)
491#endif
492#if defined(crypto_aead_aegis128l_KEYBYTES)
496#endif
497#if defined(crypto_aead_aegis256_KEYBYTES)
501#endif
508#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
512#endif
526#if defined(crypto_core_ristretto255_HASHBYTES)
540#endif
554#if defined(crypto_pwhash_SALTBYTES)
558#endif
559#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
561#endif
562#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
566#endif
568#if defined(crypto_core_ristretto255_HASHBYTES)
571#endif
575#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
582#endif
600#if defined(crypto_stream_xchacha20_KEYBYTES)
605#endif
615#if defined(sodium_base64_VARIANT_ORIGINAL)
618#endif
619
620static 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)
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)
650 ZEND_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify)
651 ZEND_FE(sodium_crypto_box, arginfo_sodium_crypto_box)
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)
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
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)
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)
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)
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
720 ZEND_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign)
722 ZEND_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519)
726 ZEND_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open)
731 ZEND_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached)
732 ZEND_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream)
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)
746 ZEND_FE(sodium_pad, arginfo_sodium_pad)
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)
756};
757
758static void register_libsodium_symbols(int module_number)
759{
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
1147static 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}
header(string $header, bool $replace=true, int $response_code=0)
char s[4]
Definition cdf.c:77
zend_long n
Definition ffi.c:4979
#define NULL
Definition gdcache.h:45
hash(string $algo, string $data, bool $binary=false, array $options=[])
Definition hash.stub.php:12
#define crypto_kx_PUBLICKEYBYTES
Definition libsodium.c:63
#define crypto_kdf_CONTEXTBYTES
Definition libsodium.c:56
#define crypto_kdf_BYTES_MAX
Definition libsodium.c:55
#define crypto_kdf_KEYBYTES
Definition libsodium.c:57
#define crypto_aead_chacha20poly1305_IETF_NSECBYTES
Definition libsodium.c:73
#define crypto_kx_SESSIONKEYBYTES
Definition libsodium.c:62
#define crypto_kx_SEEDBYTES
Definition libsodium.c:61
#define crypto_kdf_BYTES_MIN
Definition libsodium.c:54
#define crypto_aead_chacha20poly1305_IETF_KEYBYTES
Definition libsodium.c:70
#define crypto_aead_chacha20poly1305_IETF_ABYTES
Definition libsodium.c:76
#define crypto_kx_SECRETKEYBYTES
Definition libsodium.c:64
sodium_base642bin(#[\SensitiveParameter] string $string, int $id, string $ignore="")
sodium_crypto_sign_publickey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_box_keypair()
sodium_crypto_core_ristretto255_scalar_complement(string $s)
sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_sign_secretkey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_auth_keygen()
sodium_crypto_aead_chacha20poly1305_ietf_keygen()
sodium_crypto_stream_keygen()
sodium_crypto_aead_aes256gcm_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_increment(string &$string)
sodium_crypto_core_ristretto255_is_valid_point(string $s)
sodium_crypto_sign_keypair()
sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_generichash_keygen()
sodium_crypto_core_ristretto255_scalar_random()
sodium_crypto_sign_publickey_from_secretkey(#[\SensitiveParameter] string $secret_key)
sodium_add(string &$string1, string $string2)
sodium_crypto_core_ristretto255_from_hash(string $s)
sodium_crypto_auth_verify(string $mac, string $message, #[\SensitiveParameter] string $key)
sodium_crypto_generichash(string $message, #[\SensitiveParameter] string $key="", int $length=SODIUM_CRYPTO_GENERICHASH_BYTES)
sodium_crypto_core_ristretto255_scalar_sub(string $x, string $y)
sodium_crypto_pwhash_str_verify(string $hash, #[\SensitiveParameter] string $password)
sodium_crypto_kx_secretkey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_generichash_update(string &$state, string $message)
sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_secretstream_xchacha20poly1305_init_push(#[\SensitiveParameter] string $key)
sodium_bin2hex(#[\SensitiveParameter] string $string)
sodium_crypto_generichash_init(#[\SensitiveParameter] string $key="", int $length=SODIUM_CRYPTO_GENERICHASH_BYTES)
sodium_crypto_secretbox_keygen()
sodium_crypto_box_publickey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_sign_ed25519_sk_to_curve25519(#[\SensitiveParameter] string $secret_key)
sodium_crypto_core_ristretto255_random()
sodium_crypto_sign_detached(string $message, #[\SensitiveParameter] string $secret_key)
sodium_crypto_aead_aegis256_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_aead_aegis256_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data="")
sodium_crypto_sign_open(string $signed_message, string $public_key)
sodium_crypto_aead_chacha20poly1305_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_kx_seed_keypair(#[\SensitiveParameter] string $seed)
sodium_hex2bin(#[\SensitiveParameter] string $string, string $ignore="")
sodium_crypto_scalarmult_ristretto255(string $n, string $p)
sodium_crypto_pwhash(int $length, #[\SensitiveParameter] string $password, string $salt, int $opslimit, int $memlimit, int $algo=SODIUM_CRYPTO_PWHASH_ALG_DEFAULT)
sodium_compare(#[\SensitiveParameter] string $string1, #[\SensitiveParameter] string $string2)
sodium_crypto_kx_client_session_keys(#[\SensitiveParameter] string $client_key_pair, string $server_key)
sodium_crypto_aead_aegis128l_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_kx_server_session_keys(#[\SensitiveParameter] string $server_key_pair, string $client_key)
sodium_crypto_secretbox(#[\SensitiveParameter] string $message, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_aead_chacha20poly1305_ietf_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_stream_xor(#[\SensitiveParameter] string $message, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, #[\SensitiveParameter] string $message, string $additional_data="", int $tag=SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE)
sodium_crypto_core_ristretto255_scalar_mul(string $x, string $y)
sodium_crypto_box_secretkey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_core_ristretto255_add(string $p, string $q)
sodium_crypto_aead_aes256gcm_is_available()
sodium_crypto_aead_aes256gcm_keygen()
sodium_crypto_box_publickey_from_secretkey(#[\SensitiveParameter] string $secret_key)
sodium_crypto_aead_aegis256_keygen()
sodium_crypto_pwhash_str(#[\SensitiveParameter] string $password, int $opslimit, int $memlimit)
sodium_unpad(#[\SensitiveParameter] string $string, int $block_size)
sodium_crypto_core_ristretto255_scalar_add(string $x, string $y)
sodium_crypto_stream(int $length, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_kx_keypair()
sodium_crypto_core_ristretto255_scalar_negate(string $s)
sodium_crypto_box_keypair_from_secretkey_and_publickey(#[\SensitiveParameter] string $secret_key, string $public_key)
sodium_bin2base64(#[\SensitiveParameter] string $string, int $id)
sodium_crypto_box_open(string $ciphertext, string $nonce, #[\SensitiveParameter] string $key_pair)
sodium_crypto_aead_xchacha20poly1305_ietf_keygen()
sodium_crypto_core_ristretto255_scalar_reduce(string $s)
sodium_crypto_sign_keypair_from_secretkey_and_publickey(#[\SensitiveParameter] string $secret_key, string $public_key)
sodium_crypto_aead_aegis128l_encrypt(#[\SensitiveParameter] string $message, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_shorthash_keygen()
sodium_pad(#[\SensitiveParameter] string $string, int $block_size)
sodium_crypto_scalarmult_ristretto255_base(string $n)
sodium_crypto_aead_aegis128l_keygen()
sodium_crypto_box_seal(#[\SensitiveParameter] string $message, string $public_key)
sodium_crypto_kx_publickey(#[\SensitiveParameter] string $key_pair)
sodium_crypto_kdf_keygen()
sodium_crypto_stream_xchacha20_keygen()
sodium_crypto_core_ristretto255_sub(string $p, string $q)
sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key)
sodium_crypto_sign(string $message, #[\SensitiveParameter] string $secret_key)
sodium_crypto_aead_chacha20poly1305_keygen()
sodium_crypto_sign_ed25519_pk_to_curve25519(string $public_key)
sodium_crypto_box_seal_open(string $ciphertext, #[\SensitiveParameter] string $key_pair)
sodium_crypto_pwhash_str_needs_rehash(string $password, int $opslimit, int $memlimit)
sodium_crypto_box(#[\SensitiveParameter] string $message, string $nonce, #[\SensitiveParameter] string $key_pair)
sodium_crypto_pwhash_scryptsalsa208sha256(int $length, #[\SensitiveParameter] string $password, string $salt, int $opslimit, int $memlimit)
sodium_crypto_shorthash(string $message, #[\SensitiveParameter] string $key)
sodium_crypto_stream_xchacha20_xor_ic(#[\SensitiveParameter] string $message, string $nonce, int $counter,#[\SensitiveParameter] string $key)
sodium_crypto_stream_xchacha20_xor(#[\SensitiveParameter] string $message, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, #[\SensitiveParameter] string $key)
sodium_memzero(#[\SensitiveParameter] string &$string)
sodium_crypto_secretbox_open(string $ciphertext, string $nonce, #[\SensitiveParameter] string $key)
sodium_memcmp(#[\SensitiveParameter] string $string1, #[\SensitiveParameter] string $string2)
sodium_crypto_auth(string $message, #[\SensitiveParameter] string $key)
sodium_crypto_kdf_derive_from_key(int $subkey_length, int $subkey_id, string $context, #[\SensitiveParameter] string $key)
sodium_crypto_stream_xchacha20(int $length, string $nonce, #[\SensitiveParameter] string $key)
sodium_crypto_core_ristretto255_scalar_invert(string $s)
sodium_crypto_box_seed_keypair(#[\SensitiveParameter] string $seed)
sodium_crypto_scalarmult(string $n, string $p)
sodium_crypto_generichash_final(string &$state, int $length=SODIUM_CRYPTO_GENERICHASH_BYTES)
sodium_crypto_secretstream_xchacha20poly1305_keygen()
sodium_crypto_pwhash_scryptsalsa208sha256_str_verify(string $hash, #[\SensitiveParameter] string $password)
sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, #[\SensitiveParameter] string $key)
sodium_crypto_sign_seed_keypair(#[\SensitiveParameter] string $seed)
sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state)
sodium_crypto_pwhash_scryptsalsa208sha256_str(#[\SensitiveParameter] string $password, int $opslimit, int $memlimit)
#define arginfo_sodium_crypto_sign_detached
#define arginfo_sodium_crypto_kx_keypair
#define arginfo_sodium_crypto_shorthash_keygen
#define arginfo_sodium_crypto_sign_seed_keypair
#define arginfo_sodium_crypto_kx_seed_keypair
#define arginfo_sodium_crypto_secretbox_keygen
#define arginfo_sodium_crypto_shorthash
#define arginfo_sodium_unpad
#define arginfo_sodium_crypto_sign_publickey
#define arginfo_sodium_crypto_generichash_keygen
#define arginfo_sodium_memcmp
#define arginfo_sodium_crypto_sign_secretkey
#define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen
#define arginfo_sodium_crypto_box_secretkey
#define arginfo_sodium_crypto_sign_publickey_from_secretkey
#define arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey
#define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt
#define arginfo_sodium_crypto_kx_publickey
#define arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt
#define arginfo_sodium_crypto_sign_keypair
#define arginfo_sodium_crypto_kx_secretkey
#define arginfo_sodium_crypto_stream_xor
#define arginfo_sodium_memzero
#define arginfo_sodium_crypto_auth_keygen
#define arginfo_sodium_crypto_box_keypair
#define arginfo_sodium_crypto_scalarmult_base
#define arginfo_sodium_crypto_kdf_keygen
#define arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519
#define arginfo_sodium_crypto_stream_keygen
#define SODIUM_LIBRARY_VERSION()
#define SODIUM_CRYPTO_SIGN_KEYPAIRBYTES()
#define SODIUM_CRYPTO_BOX_KEYPAIRBYTES()
#define SODIUM_CRYPTO_KX_KEYPAIRBYTES()
unsigned char key[REFLECTION_KEY_LEN]
p
Definition session.c:1105
Definition dce.c:49
ZEND_API zend_class_entry * zend_register_internal_class_with_flags(zend_class_entry *class_entry, zend_class_entry *parent_ce, uint32_t ce_flags)
Definition zend_API.c:3512
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type)
Definition zend_API.h:185
#define ZEND_FE_END
Definition zend_API.h:124
struct _zend_function_entry zend_function_entry
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null)
Definition zend_API.h:205
#define INIT_CLASS_ENTRY(class_container, class_name, functions)
Definition zend_API.h:279
#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags, frameless_function_infos, doc_comment)
Definition zend_API.h:80
#define ZEND_END_ARG_INFO()
Definition zend_API.h:219
#define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value)
Definition zend_API.h:140
#define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null)
Definition zend_API.h:138
#define ZEND_FE(name, arg_info)
Definition zend_API.h:86
#define ZEND_FUNCTION(name)
Definition zend_API.h:75
#define REGISTER_STRING_CONSTANT(name, str, flags)
#define CONST_PERSISTENT
#define REGISTER_LONG_CONSTANT(name, lval, flags)
#define CG(v)
struct _zend_class_entry zend_class_entry
#define ZSTR_KNOWN(idx)
#define MAY_BE_STRING
#define MAY_BE_FALSE
#define MAY_BE_ARRAY
#define IS_TRUE
Definition zend_types.h:603
#define IS_STRING
Definition zend_types.h:606
#define IS_ARRAY
Definition zend_types.h:607
#define IS_VOID
Definition zend_types.h:617
#define IS_LONG
Definition zend_types.h:604
#define _IS_BOOL
Definition zend_types.h:629