Skip to content

Commit 3f5e315

Browse files
committed
Rename $ad to $additional_data
1 parent 2c6d168 commit 3f5e315

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

ext/sodium/libsodium.stub.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
function sodium_crypto_aead_aes256gcm_is_available(): bool {}
66

77
#ifdef HAVE_AESGCM
8-
function sodium_crypto_aead_aes256gcm_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
8+
function sodium_crypto_aead_aes256gcm_decrypt(string $string, string $additional_data, string $nonce, string $key): string|false {}
99

10-
function sodium_crypto_aead_aes256gcm_encrypt(string $string, string $ad, string $nonce, string $key): string {}
10+
function sodium_crypto_aead_aes256gcm_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
1111

1212
function sodium_crypto_aead_aes256gcm_keygen(): string {}
1313
#endif
1414

15-
function sodium_crypto_aead_chacha20poly1305_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
15+
function sodium_crypto_aead_chacha20poly1305_decrypt(string $string, string $additional_data, string $nonce, string $key): string|false {}
1616

17-
function sodium_crypto_aead_chacha20poly1305_encrypt(string $string, string $ad, string $nonce, string $key): string {}
17+
function sodium_crypto_aead_chacha20poly1305_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
1818

1919
function sodium_crypto_aead_chacha20poly1305_keygen(): string {}
2020

21-
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
21+
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $string, string $additional_data, string $nonce, string $key): string|false {}
2222

23-
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $string, string $ad, string $nonce, string $key): string {}
23+
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
2424

2525
function sodium_crypto_aead_chacha20poly1305_ietf_keygen(): string {}
2626

2727
#ifdef crypto_aead_xchacha20poly1305_IETF_NPUBBYTES
28-
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $string, string $ad, string $nonce, string $key): string|false {}
28+
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $string, string $additional_data, string $nonce, string $key): string|false {}
2929

3030
function sodium_crypto_aead_xchacha20poly1305_ietf_keygen(): string {}
3131

32-
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $string, string $ad, string $nonce, string $key): string {}
32+
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
3333
#endif
3434

3535
function sodium_crypto_auth(string $string, string $key): string {}
@@ -117,11 +117,11 @@ function sodium_crypto_secretstream_xchacha20poly1305_keygen(): string {}
117117

118118
function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key): array {}
119119

120-
function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, string $message, string $ad = "", int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE): string {}
120+
function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, string $message, string $additional_data = "", int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE): string {}
121121

122122
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $string, string $key): string {}
123123

124-
function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $ad = ""): array|false {}
124+
function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data = ""): array|false {}
125125

126126
function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state): void {}
127127
#endif

ext/sodium/libsodium_arginfo.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: bb8a7d9488d8871ba498e0bf2eeffd31b9402e4d */
2+
* Stub hash: 43b654aceabe16a8d2114d1fa53cdc7b33072f9a */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
55
ZEND_END_ARG_INFO()
66

77
#if defined(HAVE_AESGCM)
88
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_aes256gcm_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
99
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
10-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
10+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
1111
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
1212
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
1313
ZEND_END_ARG_INFO()
@@ -16,7 +16,7 @@ ZEND_END_ARG_INFO()
1616
#if defined(HAVE_AESGCM)
1717
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_encrypt, 0, 4, IS_STRING, 0)
1818
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
19-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
19+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
2020
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
2121
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
2222
ZEND_END_ARG_INFO()
@@ -29,14 +29,14 @@ ZEND_END_ARG_INFO()
2929

3030
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_chacha20poly1305_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
3131
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
32-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
32+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
3333
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
3434
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
3535
ZEND_END_ARG_INFO()
3636

3737
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_chacha20poly1305_encrypt, 0, 4, IS_STRING, 0)
3838
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
39-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
39+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
4040
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
4141
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
4242
ZEND_END_ARG_INFO()
@@ -53,7 +53,7 @@ ZEND_END_ARG_INFO()
5353
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
5454
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, 0, 4, MAY_BE_STRING|MAY_BE_FALSE)
5555
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
56-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
56+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
5757
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
5858
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
5959
ZEND_END_ARG_INFO()
@@ -67,7 +67,7 @@ ZEND_END_ARG_INFO()
6767
#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES)
6868
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, 0, 4, IS_STRING, 0)
6969
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
70-
ZEND_ARG_TYPE_INFO(0, ad, IS_STRING, 0)
70+
ZEND_ARG_TYPE_INFO(0, additional_data, IS_STRING, 0)
7171
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
7272
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
7373
ZEND_END_ARG_INFO()
@@ -259,7 +259,7 @@ ZEND_END_ARG_INFO()
259259
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_push, 0, 2, IS_STRING, 0)
260260
ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
261261
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
262-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, IS_STRING, 0, "\"\"")
262+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_data, IS_STRING, 0, "\"\"")
263263
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tag, IS_LONG, 0, "SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE")
264264
ZEND_END_ARG_INFO()
265265
#endif
@@ -275,7 +275,7 @@ ZEND_END_ARG_INFO()
275275
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
276276
ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
277277
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
278-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, IS_STRING, 0, "\"\"")
278+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_data, IS_STRING, 0, "\"\"")
279279
ZEND_END_ARG_INFO()
280280
#endif
281281

0 commit comments

Comments
 (0)