From ce3be3b6f5ecc1a2c2beaa6bfd4fabff2868f1f1 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Fri, 9 Dec 2022 11:04:36 +0100 Subject: [PATCH] Add some missing sodium functions to CallMap --- dictionaries/CallMap.php | 26 +++++++++++++++----------- dictionaries/CallMap_72_delta.php | 22 +++++++++++----------- dictionaries/CallMap_81_delta.php | 3 +++ dictionaries/CallMap_82_delta.php | 1 + 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index cf359e7f006..f902def617c 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -12382,18 +12382,18 @@ 'sodium_crypto_aead_aes256gcm_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_aes256gcm_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_aes256gcm_is_available' => ['bool'], -'sodium_crypto_aead_aes256gcm_keygen' => ['string'], +'sodium_crypto_aead_aes256gcm_keygen' => ['non-empty-string'], 'sodium_crypto_aead_chacha20poly1305_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], -'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['string'], -'sodium_crypto_aead_chacha20poly1305_keygen' => ['string'], +'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['non-empty-string'], +'sodium_crypto_aead_chacha20poly1305_keygen' => ['non-empty-string'], 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], -'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['string'], +'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['non-empty-string'], 'sodium_crypto_auth' => ['string', 'message'=>'string', 'key'=>'string'], -'sodium_crypto_auth_keygen' => ['string'], +'sodium_crypto_auth_keygen' => ['non-empty-string'], 'sodium_crypto_auth_verify' => ['bool', 'mac'=>'string', 'message'=>'string', 'key'=>'string'], 'sodium_crypto_box' => ['string', 'message'=>'string', 'nonce'=>'string', 'key_pair'=>'string'], 'sodium_crypto_box_keypair' => ['string'], @@ -12408,10 +12408,10 @@ 'sodium_crypto_generichash' => ['string', 'message'=>'string', 'key='=>'?string', 'length='=>'?int'], 'sodium_crypto_generichash_final' => ['string', '&state'=>'string', 'length='=>'?int'], 'sodium_crypto_generichash_init' => ['string', 'key='=>'?string', 'length='=>'?int'], -'sodium_crypto_generichash_keygen' => ['string'], +'sodium_crypto_generichash_keygen' => ['non-empty-string'], 'sodium_crypto_generichash_update' => ['bool', '&rw_state'=>'string', 'string'=>'string'], 'sodium_crypto_kdf_derive_from_key' => ['string', 'subkey_length'=>'int', 'subkey_id'=>'int', 'context'=>'string', 'key'=>'string'], -'sodium_crypto_kdf_keygen' => ['string'], +'sodium_crypto_kdf_keygen' => ['non-empty-string'], 'sodium_crypto_kx_client_session_keys' => ['array', 'client_keypair'=>'string', 'server_key'=>'string'], 'sodium_crypto_kx_keypair' => ['string'], 'sodium_crypto_kx_publickey' => ['string', 'key_pair'=>'string'], @@ -12428,16 +12428,16 @@ 'sodium_crypto_scalarmult' => ['string', 'n'=>'string', 'p'=>'string'], 'sodium_crypto_scalarmult_base' => ['string', 'secret_key'=>'string'], 'sodium_crypto_secretbox' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'], -'sodium_crypto_secretbox_keygen' => ['string'], +'sodium_crypto_secretbox_keygen' => ['non-empty-string'], 'sodium_crypto_secretbox_open' => ['string|false', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => ['string', 'header'=>'string', 'key'=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_init_push' => ['array', 'key'=>'string'], -'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['string'], +'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['non-empty-string'], 'sodium_crypto_secretstream_xchacha20poly1305_pull' => ['array', '&r_state'=>'string', 'ciphertext'=>'string', 'additional_data='=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_push' => ['string', '&w_state'=>'string', 'message'=>'string', 'additional_data='=>'string', 'tag='=>'int'], 'sodium_crypto_secretstream_xchacha20poly1305_rekey' => ['void', 'state'=>'string'], 'sodium_crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'], -'sodium_crypto_shorthash_keygen' => ['string'], +'sodium_crypto_shorthash_keygen' => ['non-empty-string'], 'sodium_crypto_sign' => ['string', 'message'=>'string', 'secret_key'=>'string'], 'sodium_crypto_sign_detached' => ['string', 'message'=>'string', 'secret_key'=>'string'], 'sodium_crypto_sign_ed25519_pk_to_curve25519' => ['string', 'public_key'=>'string'], @@ -12451,8 +12451,12 @@ 'sodium_crypto_sign_seed_keypair' => ['string', 'seed'=>'string'], 'sodium_crypto_sign_verify_detached' => ['bool', 'signature'=>'string', 'message'=>'string', 'public_key'=>'string'], 'sodium_crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'], -'sodium_crypto_stream_keygen' => ['string'], +'sodium_crypto_stream_keygen' => ['non-empty-string'], 'sodium_crypto_stream_xor' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'], +'sodium_crypto_stream_xchacha20' => ['non-empty-string', 'length'=>'positive-int', 'nonce'=>'non-empty-string', 'key'=>'non-empty-string'], +'sodium_crypto_stream_xchacha20_keygen' => ['non-empty-string'], +'sodium_crypto_stream_xchacha20_xor' => ['string', 'message'=>'string', 'nonce'=>'non-empty-string', 'key'=>'non-empty-string'], +'sodium_crypto_stream_xchacha20_xor_ic' => ['string', 'message'=>'string', 'nonce'=>'non-empty-string', 'counter'=>'int', 'key'=>'non-empty-string'], 'sodium_hex2bin' => ['string', 'string'=>'string', 'ignore='=>'string'], 'sodium_increment' => ['void', '&rw_string'=>'string'], 'sodium_memcmp' => ['int', 'string1'=>'string', 'string2'=>'string'], diff --git a/dictionaries/CallMap_72_delta.php b/dictionaries/CallMap_72_delta.php index 9a7b5996ae7..4fdd3f0a25c 100644 --- a/dictionaries/CallMap_72_delta.php +++ b/dictionaries/CallMap_72_delta.php @@ -52,18 +52,18 @@ 'sodium_crypto_aead_aes256gcm_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_aes256gcm_encrypt' => ['string', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_aes256gcm_is_available' => ['bool'], - 'sodium_crypto_aead_aes256gcm_keygen' => ['string'], + 'sodium_crypto_aead_aes256gcm_keygen' => ['non-empty-string'], 'sodium_crypto_aead_chacha20poly1305_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], - 'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['string'], - 'sodium_crypto_aead_chacha20poly1305_keygen' => ['string'], + 'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => ['non-empty-string'], + 'sodium_crypto_aead_chacha20poly1305_keygen' => ['non-empty-string'], 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => ['string|false', 'message'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], - 'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['string'], + 'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => ['non-empty-string'], 'sodium_crypto_auth' => ['string', 'message'=>'string', 'key'=>'string'], - 'sodium_crypto_auth_keygen' => ['string'], + 'sodium_crypto_auth_keygen' => ['non-empty-string'], 'sodium_crypto_auth_verify' => ['bool', 'mac'=>'string', 'message'=>'string', 'key'=>'string'], 'sodium_crypto_box' => ['string', 'message'=>'string', 'nonce'=>'string', 'key_pair'=>'string'], 'sodium_crypto_box_keypair' => ['string'], @@ -78,10 +78,10 @@ 'sodium_crypto_generichash' => ['string', 'message'=>'string', 'key='=>'?string', 'length='=>'?int'], 'sodium_crypto_generichash_final' => ['string', '&state'=>'string', 'length='=>'?int'], 'sodium_crypto_generichash_init' => ['string', 'key='=>'?string', 'length='=>'?int'], - 'sodium_crypto_generichash_keygen' => ['string'], + 'sodium_crypto_generichash_keygen' => ['non-empty-string'], 'sodium_crypto_generichash_update' => ['bool', '&rw_state'=>'string', 'string'=>'string'], 'sodium_crypto_kdf_derive_from_key' => ['string', 'subkey_length'=>'int', 'subkey_id'=>'int', 'context'=>'string', 'key'=>'string'], - 'sodium_crypto_kdf_keygen' => ['string'], + 'sodium_crypto_kdf_keygen' => ['non-empty-string'], 'sodium_crypto_kx_client_session_keys' => ['array', 'client_keypair'=>'string', 'server_key'=>'string'], 'sodium_crypto_kx_keypair' => ['string'], 'sodium_crypto_kx_publickey' => ['string', 'key_pair'=>'string'], @@ -98,16 +98,16 @@ 'sodium_crypto_scalarmult' => ['string', 'n'=>'string', 'p'=>'string'], 'sodium_crypto_scalarmult_base' => ['string', 'secret_key'=>'string'], 'sodium_crypto_secretbox' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'], - 'sodium_crypto_secretbox_keygen' => ['string'], + 'sodium_crypto_secretbox_keygen' => ['non-empty-string'], 'sodium_crypto_secretbox_open' => ['string|false', 'ciphertext'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => ['string', 'header'=>'string', 'key'=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_init_push' => ['array', 'key'=>'string'], - 'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['string'], + 'sodium_crypto_secretstream_xchacha20poly1305_keygen' => ['non-empty-string'], 'sodium_crypto_secretstream_xchacha20poly1305_pull' => ['array', '&r_state'=>'string', 'ciphertext'=>'string', 'additional_data='=>'string'], 'sodium_crypto_secretstream_xchacha20poly1305_push' => ['string', '&w_state'=>'string', 'message'=>'string', 'additional_data='=>'string', 'tag='=>'int'], 'sodium_crypto_secretstream_xchacha20poly1305_rekey' => ['void', 'state'=>'string'], 'sodium_crypto_shorthash' => ['string', 'message'=>'string', 'key'=>'string'], - 'sodium_crypto_shorthash_keygen' => ['string'], + 'sodium_crypto_shorthash_keygen' => ['non-empty-string'], 'sodium_crypto_sign' => ['string', 'message'=>'string', 'secret_key'=>'string'], 'sodium_crypto_sign_detached' => ['string', 'message'=>'string', 'secret_key'=>'string'], 'sodium_crypto_sign_ed25519_pk_to_curve25519' => ['string', 'public_key'=>'string'], @@ -121,7 +121,7 @@ 'sodium_crypto_sign_seed_keypair' => ['string', 'seed'=>'string'], 'sodium_crypto_sign_verify_detached' => ['bool', 'signature'=>'string', 'message'=>'string', 'public_key'=>'string'], 'sodium_crypto_stream' => ['string', 'length'=>'int', 'nonce'=>'string', 'key'=>'string'], - 'sodium_crypto_stream_keygen' => ['string'], + 'sodium_crypto_stream_keygen' => ['non-empty-string'], 'sodium_crypto_stream_xor' => ['string', 'message'=>'string', 'nonce'=>'string', 'key'=>'string'], 'sodium_hex2bin' => ['string', 'string'=>'string', 'ignore='=>'string'], 'sodium_increment' => ['void', '&rw_string'=>'string'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index 2f7fb6958aa..e4c4635f7a8 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -50,6 +50,9 @@ 'ReflectionFunctionAbstract::hasTentativeReturnType' => ['bool'], 'ReflectionFunctionAbstract::isStatic' => ['bool'], 'ReflectionObject::isEnum' => ['bool'], + 'sodium_crypto_stream_xchacha20' => ['non-empty-string', 'length'=>'positive-int', 'nonce'=>'non-empty-string', 'key'=>'non-empty-string'], + 'sodium_crypto_stream_xchacha20_keygen' => ['non-empty-string'], + 'sodium_crypto_stream_xchacha20_xor' => ['string', 'message'=>'string', 'nonce'=>'non-empty-string', 'key'=>'non-empty-string'], ], 'changed' => [ diff --git a/dictionaries/CallMap_82_delta.php b/dictionaries/CallMap_82_delta.php index 6d26c55ed1a..554cf4acc26 100644 --- a/dictionaries/CallMap_82_delta.php +++ b/dictionaries/CallMap_82_delta.php @@ -21,6 +21,7 @@ 'openssl_cipher_key_length' => ['positive-int|false', 'cipher_algo'=>'non-empty-string'], 'curl_upkeep' => ['bool', 'handle'=>'CurlHandle'], 'ini_parse_quantity' => ['int', 'shorthand'=>'non-empty-string'], + 'sodium_crypto_stream_xchacha20_xor_ic' => ['string', 'message'=>'string', 'nonce'=>'non-empty-string', 'counter'=>'int', 'key'=>'non-empty-string'], 'memory_reset_peak_usage' => ['void'], ],