Skip to content

Correct the argument names for ext/sodium functions #6969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ext/sodium/libsodium.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function sodium_crypto_box_publickey(string $key_pair): string {}

function sodium_crypto_box_publickey_from_secretkey(string $secret_key): string {}

function sodium_crypto_box_seal(string $message, string $key_pair): string {}
function sodium_crypto_box_seal(string $message, string $public_key): string {}

function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string|false {}

Expand Down Expand Up @@ -176,7 +176,7 @@ function sodium_crypto_sign_keypair(): string {}

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

function sodium_crypto_sign_open(string $ciphertext, string $public_key): string|false {}
function sodium_crypto_sign_open(string $signed_message, string $public_key): string|false {}

function sodium_crypto_sign_publickey(string $key_pair): string {}

Expand Down Expand Up @@ -212,7 +212,7 @@ function sodium_memcmp(string $string1, string $string2): int {}

function sodium_memzero(string &$string): void {}

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

function sodium_unpad(string $string, int $block_size): string {}

Expand Down
13 changes: 5 additions & 8 deletions ext/sodium/libsodium_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 286436656e37c5d71de69ed6365b5202e0965f19 */
* Stub hash: 7213518d1b2e9322194d677f13634f61c5f71af8 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -119,7 +119,7 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_box_seal, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, key_pair, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_box_seal_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
Expand Down Expand Up @@ -396,7 +396,7 @@ ZEND_END_ARG_INFO()
#define arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_sodium_crypto_sign_open, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, ciphertext, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, signed_message, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, public_key, IS_STRING, 0)
ZEND_END_ARG_INFO()

Expand Down Expand Up @@ -464,15 +464,12 @@ ZEND_END_ARG_INFO()
#define arginfo_sodium_memzero arginfo_sodium_increment

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_pad, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_unpad, 0, 2, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, block_size, IS_LONG, 0)
ZEND_END_ARG_INFO()

#define arginfo_sodium_unpad arginfo_sodium_pad

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_bin2hex, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
Expand Down