diff --git a/Zend/Optimizer/zend_func_info.c b/Zend/Optimizer/zend_func_info.c index 10cb135ef7061..86575c190f381 100644 --- a/Zend/Optimizer/zend_func_info.c +++ b/Zend/Optimizer/zend_func_info.c @@ -527,74 +527,6 @@ static const func_info_t old_func_infos[] = { F1("mhash_get_hash_name", MAY_BE_FALSE | MAY_BE_STRING), F1("mhash", MAY_BE_FALSE | MAY_BE_FALSE | MAY_BE_STRING), - /* ext/sodium */ - F1("sodium_crypto_shorthash", MAY_BE_STRING), - F1("sodium_crypto_secretbox", MAY_BE_STRING), - F1("sodium_crypto_secretbox_open", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_generichash", MAY_BE_STRING), - F1("sodium_crypto_generichash_init", MAY_BE_STRING), - F0("sodium_crypto_generichash_update", MAY_BE_TRUE), - F1("sodium_crypto_generichash_final", MAY_BE_STRING), - F1("sodium_crypto_box_keypair", MAY_BE_STRING), - F1("sodium_crypto_box_seed_keypair", MAY_BE_STRING), - F1("sodium_crypto_box_secretkey", MAY_BE_STRING), - F1("sodium_crypto_box_publickey", MAY_BE_STRING), - F1("sodium_crypto_box", MAY_BE_STRING), - F1("sodium_crypto_box_open", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_box_seal", MAY_BE_STRING), - F1("sodium_crypto_box_seal_open", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_sign_keypair", MAY_BE_STRING), - F1("sodium_crypto_sign_seed_keypair", MAY_BE_STRING), - F1("sodium_crypto_sign_secretkey", MAY_BE_STRING), - F1("sodium_crypto_sign_publickey", MAY_BE_STRING), - F1("sodium_crypto_sign", MAY_BE_STRING), - F1("sodium_crypto_sign_open", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_sign_detached", MAY_BE_STRING), - F1("sodium_crypto_stream", MAY_BE_STRING), - F1("sodium_crypto_stream_xor", MAY_BE_STRING), - F1("sodium_crypto_pwhash", MAY_BE_STRING), - F1("sodium_crypto_pwhash_str", MAY_BE_STRING), - F1("sodium_crypto_aead_aes256gcm_encrypt", MAY_BE_STRING), - F1("sodium_crypto_aead_aes256gcm_decrypt", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_bin2hex", MAY_BE_STRING), - F1("sodium_hex2bin", MAY_BE_STRING), - F1("sodium_crypto_scalarmult", MAY_BE_STRING), - F1("sodium_crypto_kx_seed_keypair", MAY_BE_STRING), - F1("sodium_crypto_kx_keypair", MAY_BE_STRING), - F1("sodium_crypto_kx_secretkey", MAY_BE_STRING), - F1("sodium_crypto_kx_publickey", MAY_BE_STRING), - F1("sodium_crypto_kx_client_session_keys", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("sodium_crypto_kx_server_session_keys", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), - F1("sodium_crypto_auth", MAY_BE_STRING), - F1("sodium_crypto_aead_aes256gcm_keygen", MAY_BE_STRING), - F1("sodium_crypto_auth_keygen", MAY_BE_STRING), - F1("sodium_crypto_generichash_keygen", MAY_BE_STRING), - F1("sodium_crypto_kdf_keygen", MAY_BE_STRING), - F1("sodium_crypto_secretbox_keygen", MAY_BE_STRING), - F1("sodium_crypto_shorthash_keygen", MAY_BE_STRING), - F1("sodium_crypto_stream_keygen", MAY_BE_STRING), - F1("sodium_crypto_kdf_derive_from_key", MAY_BE_STRING), - F1("sodium_pad", MAY_BE_STRING), - F1("sodium_unpad", MAY_BE_STRING), - - F1("sodium_crypto_box_keypair_from_secretkey_and_publickey", MAY_BE_STRING), - F1("sodium_crypto_box_publickey_from_secretkey", MAY_BE_STRING), - F1("sodium_crypto_sign_keypair_from_secretkey_and_publickey", MAY_BE_STRING), - F1("sodium_crypto_sign_publickey_from_secretkey", MAY_BE_STRING), - F1("sodium_crypto_pwhash_scryptsalsa208sha256", MAY_BE_STRING), - F1("sodium_crypto_pwhash_scryptsalsa208sha256_str", MAY_BE_STRING), - F1("sodium_crypto_sign_ed25519_sk_to_curve25519", MAY_BE_STRING), - F1("sodium_crypto_sign_ed25519_pk_to_curve25519", MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_encrypt", MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_decrypt", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_ietf_encrypt", MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_ietf_decrypt", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", MAY_BE_STRING), - F1("sodium_crypto_aead_xchacha20poly1305_ietf_decrypt", MAY_BE_FALSE | MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_keygen", MAY_BE_STRING), - F1("sodium_crypto_aead_chacha20poly1305_ietf_keygen", MAY_BE_STRING), - F1("sodium_crypto_aead_xchacha20poly1305_ietf_keygen", MAY_BE_STRING), - /* ext/pgsql */ F1("pg_dbname", MAY_BE_STRING), F1("pg_options", MAY_BE_STRING), diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index a2874b2d4250b..44d33d64383b1 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -113,6 +113,9 @@ static const func_info_t func_infos[] = { F1("exif_read_data", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE), F1("exif_thumbnail", MAY_BE_STRING|MAY_BE_FALSE), F1("pg_socket", MAY_BE_RESOURCE|MAY_BE_FALSE), + FN("sodium_crypto_kx_client_session_keys", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), + FN("sodium_crypto_kx_server_session_keys", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), + F0("sodium_crypto_generichash_update", MAY_BE_TRUE), F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE|MAY_BE_NULL), F1("filter_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), FN("pcntl_signal_get_handler", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_OBJECT|MAY_BE_LONG), diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index 047dcced0bc49..0e52426ac9977 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -94,8 +94,10 @@ function sodium_crypto_kx_secretkey(string $key_pair): string {} function sodium_crypto_kx_seed_keypair(string $seed): string {} +/** @return array */ function sodium_crypto_kx_client_session_keys(string $client_key_pair, string $server_key): array {} +/** @return array */ function sodium_crypto_kx_server_session_keys(string $server_key_pair, string $client_key): array {} function sodium_crypto_generichash(string $message, string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {} @@ -104,6 +106,7 @@ function sodium_crypto_generichash_keygen(): string {} function sodium_crypto_generichash_init(string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {} +/** @return true */ function sodium_crypto_generichash_update(string &$state, string $message): bool {} function sodium_crypto_generichash_final(string &$state, int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {} diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h index 34c0acced0fb0..7086eb5a598bf 100644 --- a/ext/sodium/libsodium_arginfo.h +++ b/ext/sodium/libsodium_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7213518d1b2e9322194d677f13634f61c5f71af8 */ + * Stub hash: 91286b83d2bbfb3fb3c99eb5da907d788f7e17ac */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO()