Skip to content

Commit 2c6d168

Browse files
committed
Update ext/sodium parameter names
1 parent 656c37a commit 2c6d168

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

ext/sodium/libsodium.stub.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ function sodium_crypto_generichash_update(string &$state, string $string): bool
8080

8181
function sodium_crypto_generichash_final(string &$state, int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {}
8282

83-
function sodium_crypto_kdf_derive_from_key(int $subkey_len, int $subkey_id, string $context, string $key): string {}
83+
function sodium_crypto_kdf_derive_from_key(int $subkey_length, int $subkey_id, string $context, string $key): string {}
8484

8585
function sodium_crypto_kdf_keygen(): string {}
8686

8787
#ifdef crypto_pwhash_SALTBYTES
88-
function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $alg = SODIUM_CRYPTO_PWHASH_ALG_DEFAULT): string {}
88+
function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $algo = SODIUM_CRYPTO_PWHASH_ALG_DEFAULT): string {}
8989

9090
function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string {}
9191

@@ -104,7 +104,7 @@ function sodium_crypto_pwhash_scryptsalsa208sha256_str(string $password, int $op
104104
function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify(string $hash, string $password): bool {}
105105
#endif
106106

107-
function sodium_crypto_scalarmult(string $string_1, string $string_2): string {}
107+
function sodium_crypto_scalarmult(string $string1, string $string2): string {}
108108

109109
function sodium_crypto_secretbox(string $string, string $nonce, string $key): string {}
110110

@@ -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 $msg, string $ad = "", int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE): string {}
120+
function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, string $message, string $ad = "", 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 $c, string $ad = ""): array|false {}
124+
function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $ad = ""): array|false {}
125125

126126
function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state): void {}
127127
#endif
@@ -160,13 +160,13 @@ function sodium_crypto_stream_keygen(): string {}
160160

161161
function sodium_crypto_stream_xor(string $string, string $nonce, string $key): string {}
162162

163-
function sodium_add(string &$string_1, string $string_2): void {}
163+
function sodium_add(string &$string1, string $string2): void {}
164164

165-
function sodium_compare(string $string_1, string $string_2): int {}
165+
function sodium_compare(string $string1, string $string2): int {}
166166

167167
function sodium_increment(string &$string): void {}
168168

169-
function sodium_memcmp(string $string_1, string $string_2): int {}
169+
function sodium_memcmp(string $string1, string $string2): int {}
170170

171171
function sodium_memzero(string &$reference): void {}
172172

ext/sodium/libsodium_arginfo.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 5d064655caf10f5e0dd126009755bf3552c63f59 */
2+
* Stub hash: bb8a7d9488d8871ba498e0bf2eeffd31b9402e4d */
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()
@@ -166,7 +166,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_final,
166166
ZEND_END_ARG_INFO()
167167

168168
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kdf_derive_from_key, 0, 4, IS_STRING, 0)
169-
ZEND_ARG_TYPE_INFO(0, subkey_len, IS_LONG, 0)
169+
ZEND_ARG_TYPE_INFO(0, subkey_length, IS_LONG, 0)
170170
ZEND_ARG_TYPE_INFO(0, subkey_id, IS_LONG, 0)
171171
ZEND_ARG_TYPE_INFO(0, context, IS_STRING, 0)
172172
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
@@ -181,7 +181,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_pwhash, 0, 5, IS_S
181181
ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
182182
ZEND_ARG_TYPE_INFO(0, opslimit, IS_LONG, 0)
183183
ZEND_ARG_TYPE_INFO(0, memlimit, IS_LONG, 0)
184-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alg, IS_LONG, 0, "SODIUM_CRYPTO_PWHASH_ALG_DEFAULT")
184+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, algo, IS_LONG, 0, "SODIUM_CRYPTO_PWHASH_ALG_DEFAULT")
185185
ZEND_END_ARG_INFO()
186186
#endif
187187

@@ -234,8 +234,8 @@ ZEND_END_ARG_INFO()
234234
#endif
235235

236236
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_scalarmult, 0, 2, IS_STRING, 0)
237-
ZEND_ARG_TYPE_INFO(0, string_1, IS_STRING, 0)
238-
ZEND_ARG_TYPE_INFO(0, string_2, IS_STRING, 0)
237+
ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0)
238+
ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
239239
ZEND_END_ARG_INFO()
240240

241241
#define arginfo_sodium_crypto_secretbox arginfo_sodium_crypto_box
@@ -258,7 +258,7 @@ ZEND_END_ARG_INFO()
258258
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
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)
261-
ZEND_ARG_TYPE_INFO(0, msg, IS_STRING, 0)
261+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
262262
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, 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()
@@ -274,7 +274,7 @@ ZEND_END_ARG_INFO()
274274
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
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)
277-
ZEND_ARG_TYPE_INFO(0, c, IS_STRING, 0)
277+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
278278
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ad, IS_STRING, 0, "\"\"")
279279
ZEND_END_ARG_INFO()
280280
#endif
@@ -330,13 +330,13 @@ ZEND_END_ARG_INFO()
330330
#define arginfo_sodium_crypto_stream_xor arginfo_sodium_crypto_box
331331

332332
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_add, 0, 2, IS_VOID, 0)
333-
ZEND_ARG_TYPE_INFO(1, string_1, IS_STRING, 0)
334-
ZEND_ARG_TYPE_INFO(0, string_2, IS_STRING, 0)
333+
ZEND_ARG_TYPE_INFO(1, string1, IS_STRING, 0)
334+
ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
335335
ZEND_END_ARG_INFO()
336336

337337
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_compare, 0, 2, IS_LONG, 0)
338-
ZEND_ARG_TYPE_INFO(0, string_1, IS_STRING, 0)
339-
ZEND_ARG_TYPE_INFO(0, string_2, IS_STRING, 0)
338+
ZEND_ARG_TYPE_INFO(0, string1, IS_STRING, 0)
339+
ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
340340
ZEND_END_ARG_INFO()
341341

342342
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_increment, 0, 1, IS_VOID, 0)

0 commit comments

Comments
 (0)