sodium_crypto_aead_chacha20poly1305_ietf_decrypt function mentions in its documentation that it'll always return a string. But when passed a malformed input as argument, it returns a boolean(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_aead_chacha20poly1305_ietf_decrypt — Überprüft, ob der Chiffriertext ein gültiges Tag enthält
$ciphertext,$additional_data,$nonce,$keyVerschlüsselt und authentifiziert eine Nachricht mit ChaCha20-Poly1305 (IETF-Variante).
Die IETF-Variante verwendet 96-Bit-Nonces und interne 32-Bit Zähler anstelle von 64-Bit für beides.
ciphertextadditional_datanoncekey
Gibt im Erfolgsfall den Klartext zurück. Bei einem Fehler wird false zurückgegeben.
sodium_crypto_aead_chacha20poly1305_ietf_decrypt function mentions in its documentation that it'll always return a string. But when passed a malformed input as argument, it returns a boolean