Summery Summery
AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)
Syntax Syntax
Parameters Parameters
- $message
-
(Optional)
Default value: ''
- $ad
-
(Optional)
Default value: ''
- $nonce
-
(Optional)
Default value: ''
- $key
-
(Optional)
Default value: ''
Return Return
(string)
Source Source
File: wp-includes/sodium_compat/src/Crypto32.php
public static function aead_xchacha20poly1305_ietf_decrypt( $message = '', $ad = '', $nonce = '', $key = '' ) { $subkey = ParagonIE_Sodium_Core32_HChaCha20::hChaCha20( ParagonIE_Sodium_Core32_Util::substr($nonce, 0, 16), $key ); $nonceLast = "\x00\x00\x00\x00" . ParagonIE_Sodium_Core32_Util::substr($nonce, 16, 8); return self::aead_chacha20poly1305_ietf_decrypt($message, $ad, $nonceLast, $subkey); }