Skip to content

Commit 4aa7416

Browse files
committed
Use $ciphertext and $message
1 parent 3f5e315 commit 4aa7416

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

ext/sodium/libsodium.stub.php

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

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

10-
function sodium_crypto_aead_aes256gcm_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
10+
function sodium_crypto_aead_aes256gcm_encrypt(string $message, 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 $additional_data, string $nonce, string $key): string|false {}
15+
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
1616

17-
function sodium_crypto_aead_chacha20poly1305_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
17+
function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, 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 $additional_data, string $nonce, string $key): string|false {}
21+
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
2222

23-
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $string, string $additional_data, string $nonce, string $key): string {}
23+
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, 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 $additional_data, string $nonce, string $key): string|false {}
28+
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, 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 $additional_data, string $nonce, string $key): string {}
32+
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}
3333
#endif
3434

35-
function sodium_crypto_auth(string $string, string $key): string {}
35+
function sodium_crypto_auth(string $message, string $key): string {}
3636

3737
function sodium_crypto_auth_keygen(): string {}
3838

39-
function sodium_crypto_auth_verify(string $signature, string $string, string $key): bool {}
39+
function sodium_crypto_auth_verify(string $signature, string $message, string $key): bool {}
4040

41-
function sodium_crypto_box(string $string, string $nonce, string $key): string {}
41+
function sodium_crypto_box(string $message, string $nonce, string $key): string {}
4242

4343
function sodium_crypto_box_keypair(): string {}
4444

4545
function sodium_crypto_box_seed_keypair(string $key): string {}
4646

4747
function sodium_crypto_box_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
4848

49-
function sodium_crypto_box_open(string $string, string $nonce, string $key): string|false {}
49+
function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key): string|false {}
5050

5151
function sodium_crypto_box_publickey(string $key): string {}
5252

5353
function sodium_crypto_box_publickey_from_secretkey(string $key): string {}
5454

55-
function sodium_crypto_box_seal(string $string, string $key): string {}
55+
function sodium_crypto_box_seal(string $message, string $key): string {}
5656

57-
function sodium_crypto_box_seal_open(string $string, string $key): string|false {}
57+
function sodium_crypto_box_seal_open(string $ciphertext, string $key): string|false {}
5858

5959
function sodium_crypto_box_secretkey(string $key): string {}
6060

@@ -64,13 +64,13 @@ function sodium_crypto_kx_publickey(string $key): string {}
6464

6565
function sodium_crypto_kx_secretkey(string $key): string {}
6666

67-
function sodium_crypto_kx_seed_keypair(string $string): string {}
67+
function sodium_crypto_kx_seed_keypair(string $seed): string {}
6868

6969
function sodium_crypto_kx_client_session_keys(string $client_keypair, string $server_key): array {}
7070

7171
function sodium_crypto_kx_server_session_keys(string $server_keypair, string $client_key): array {}
7272

73-
function sodium_crypto_generichash(string $string, string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {}
73+
function sodium_crypto_generichash(string $message, string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {}
7474

7575
function sodium_crypto_generichash_keygen(): string {}
7676

@@ -104,13 +104,13 @@ 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 $string1, string $string2): string {}
107+
function sodium_crypto_scalarmult(string $n, string $p): string {}
108108

109-
function sodium_crypto_secretbox(string $string, string $nonce, string $key): string {}
109+
function sodium_crypto_secretbox(string $message, string $nonce, string $key): string {}
110110

111111
function sodium_crypto_secretbox_keygen(): string {}
112112

113-
function sodium_crypto_secretbox_open(string $string, string $nonce, string $key): string|false {}
113+
function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string|false {}
114114

115115
#ifdef crypto_secretstream_xchacha20poly1305_ABYTES
116116
function sodium_crypto_secretstream_xchacha20poly1305_keygen(): string {}
@@ -119,20 +119,20 @@ function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key): ar
119119

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

122-
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $string, string $key): string {}
122+
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, string $key): string {}
123123

124124
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
128128

129-
function sodium_crypto_shorthash(string $string, string $key): string {}
129+
function sodium_crypto_shorthash(string $message, string $key): string {}
130130

131131
function sodium_crypto_shorthash_keygen(): string {}
132132

133-
function sodium_crypto_sign(string $string, string $keypair): string {}
133+
function sodium_crypto_sign(string $message, string $keypair): string {}
134134

135-
function sodium_crypto_sign_detached(string $string, string $keypair): string {}
135+
function sodium_crypto_sign_detached(string $message, string $keypair): string {}
136136

137137
function sodium_crypto_sign_ed25519_pk_to_curve25519(string $key): string {}
138138

@@ -142,7 +142,7 @@ function sodium_crypto_sign_keypair(): string {}
142142

143143
function sodium_crypto_sign_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
144144

145-
function sodium_crypto_sign_open(string $string, string $keypair): string|false {}
145+
function sodium_crypto_sign_open(string $ciphertext, string $keypair): string|false {}
146146

147147
function sodium_crypto_sign_publickey(string $key): string {}
148148

@@ -152,13 +152,13 @@ function sodium_crypto_sign_publickey_from_secretkey(string $key): string {}
152152

153153
function sodium_crypto_sign_seed_keypair(string $key): string {}
154154

155-
function sodium_crypto_sign_verify_detached(string $signature, string $string, string $key): bool {}
155+
function sodium_crypto_sign_verify_detached(string $signature, string $message, string $key): bool {}
156156

157157
function sodium_crypto_stream(int $length, string $nonce, string $key): string {}
158158

159159
function sodium_crypto_stream_keygen(): string {}
160160

161-
function sodium_crypto_stream_xor(string $string, string $nonce, string $key): string {}
161+
function sodium_crypto_stream_xor(string $message, string $nonce, string $key): string {}
162162

163163
function sodium_add(string &$string1, string $string2): void {}
164164

@@ -168,7 +168,7 @@ function sodium_increment(string &$string): void {}
168168

169169
function sodium_memcmp(string $string1, string $string2): int {}
170170

171-
function sodium_memzero(string &$reference): void {}
171+
function sodium_memzero(string &$string): void {}
172172

173173
function sodium_pad(string $string, int $length): string {}
174174

ext/sodium/libsodium_arginfo.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 43b654aceabe16a8d2114d1fa53cdc7b33072f9a */
2+
* Stub hash: 1b4db83553e156fc38c6e83681f351639a39ac4f */
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)
9-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
9+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
1010
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)
@@ -15,7 +15,7 @@ ZEND_END_ARG_INFO()
1515

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)
18-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
18+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
1919
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)
@@ -28,14 +28,14 @@ ZEND_END_ARG_INFO()
2828
#endif
2929

3030
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, string, IS_STRING, 0)
31+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
3232
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)
38-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
38+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
3939
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)
@@ -52,7 +52,7 @@ ZEND_END_ARG_INFO()
5252

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)
55-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
55+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
5656
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)
@@ -66,28 +66,28 @@ ZEND_END_ARG_INFO()
6666

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)
69-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
69+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
7070
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()
7474
#endif
7575

7676
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_auth, 0, 2, IS_STRING, 0)
77-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
77+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
7878
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
7979
ZEND_END_ARG_INFO()
8080

8181
#define arginfo_sodium_crypto_auth_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
8282

8383
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_auth_verify, 0, 3, _IS_BOOL, 0)
8484
ZEND_ARG_TYPE_INFO(0, signature, IS_STRING, 0)
85-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
85+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
8686
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
8787
ZEND_END_ARG_INFO()
8888

8989
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box, 0, 3, IS_STRING, 0)
90-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
90+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
9191
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
9292
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
9393
ZEND_END_ARG_INFO()
@@ -104,7 +104,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_keypair_from_s
104104
ZEND_END_ARG_INFO()
105105

106106
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, string, IS_STRING, 0)
107+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
108108
ZEND_ARG_TYPE_INFO(0, nonce, IS_STRING, 0)
109109
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
110110
ZEND_END_ARG_INFO()
@@ -116,7 +116,7 @@ ZEND_END_ARG_INFO()
116116
#define arginfo_sodium_crypto_box_seal arginfo_sodium_crypto_auth
117117

118118
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_seal_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
119-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
119+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
120120
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
121121
ZEND_END_ARG_INFO()
122122

@@ -129,7 +129,7 @@ ZEND_END_ARG_INFO()
129129
#define arginfo_sodium_crypto_kx_secretkey arginfo_sodium_crypto_box_seed_keypair
130130

131131
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kx_seed_keypair, 0, 1, IS_STRING, 0)
132-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
132+
ZEND_ARG_TYPE_INFO(0, seed, IS_STRING, 0)
133133
ZEND_END_ARG_INFO()
134134

135135
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kx_client_session_keys, 0, 2, IS_ARRAY, 0)
@@ -143,7 +143,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kx_server_session_
143143
ZEND_END_ARG_INFO()
144144

145145
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash, 0, 1, IS_STRING, 0)
146-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
146+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
147147
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 0, "\"\"")
148148
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
149149
ZEND_END_ARG_INFO()
@@ -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, string1, IS_STRING, 0)
238-
ZEND_ARG_TYPE_INFO(0, string2, IS_STRING, 0)
237+
ZEND_ARG_TYPE_INFO(0, n, IS_STRING, 0)
238+
ZEND_ARG_TYPE_INFO(0, p, IS_STRING, 0)
239239
ZEND_END_ARG_INFO()
240240

241241
#define arginfo_sodium_crypto_secretbox arginfo_sodium_crypto_box
@@ -266,7 +266,7 @@ ZEND_END_ARG_INFO()
266266

267267
#if defined(crypto_secretstream_xchacha20poly1305_ABYTES)
268268
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull, 0, 2, IS_STRING, 0)
269-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
269+
ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0)
270270
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
271271
ZEND_END_ARG_INFO()
272272
#endif
@@ -290,7 +290,7 @@ ZEND_END_ARG_INFO()
290290
#define arginfo_sodium_crypto_shorthash_keygen arginfo_sodium_crypto_aead_chacha20poly1305_keygen
291291

292292
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_sign, 0, 2, IS_STRING, 0)
293-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
293+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
294294
ZEND_ARG_TYPE_INFO(0, keypair, IS_STRING, 0)
295295
ZEND_END_ARG_INFO()
296296

@@ -305,7 +305,7 @@ ZEND_END_ARG_INFO()
305305
#define arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey
306306

307307
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_sign_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
308-
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
308+
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
309309
ZEND_ARG_TYPE_INFO(0, keypair, IS_STRING, 0)
310310
ZEND_END_ARG_INFO()
311311

@@ -345,9 +345,7 @@ ZEND_END_ARG_INFO()
345345

346346
#define arginfo_sodium_memcmp arginfo_sodium_compare
347347

348-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_memzero, 0, 1, IS_VOID, 0)
349-
ZEND_ARG_TYPE_INFO(1, reference, IS_STRING, 0)
350-
ZEND_END_ARG_INFO()
348+
#define arginfo_sodium_memzero arginfo_sodium_increment
351349

352350
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_pad, 0, 2, IS_STRING, 0)
353351
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -359,7 +357,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_unpad, 0, 2, IS_STRING, 0
359357
ZEND_ARG_TYPE_INFO(0, block_size, IS_LONG, 0)
360358
ZEND_END_ARG_INFO()
361359

362-
#define arginfo_sodium_bin2hex arginfo_sodium_crypto_kx_seed_keypair
360+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_bin2hex, 0, 1, IS_STRING, 0)
361+
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
362+
ZEND_END_ARG_INFO()
363363

364364
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_hex2bin, 0, 1, IS_STRING, 0)
365365
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)

ext/sodium/tests/sodium_error_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $key = random_bytes(SODIUM_CRYPTO_SHORTHASH_KEYBYTES);
1515
$hash = do_crypto_shorthash($m, $key);
1616
?>
1717
--EXPECTF--
18-
Fatal error: Uncaught TypeError: sodium_crypto_shorthash(): Argument #1 ($string) must be of type string, int given in %s:%d
18+
Fatal error: Uncaught TypeError: sodium_crypto_shorthash(): Argument #1 ($message) must be of type string, int given in %s:%d
1919
Stack trace:
2020
#0 %s(%d): sodium_crypto_shorthash()
2121
#1 %s(%d): do_crypto_shorthash()

0 commit comments

Comments
 (0)