ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_encrypt() public WP 1.0
AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)
{} Это метод класса: ParagonIE_Sodium_Crypto{}
Хуков нет.
Возвращает
Строку.
Использование
$result = ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_encrypt(;
Код ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_encrypt() ParagonIE Sodium Crypto::aead xchacha20poly1305 ietf encrypt WP 5.6.2
public static function aead_xchacha20poly1305_ietf_encrypt(
$message = '',
$ad = '',
$nonce = '',
$key = ''
) {
$subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20(
ParagonIE_Sodium_Core_Util::substr($nonce, 0, 16),
$key
);
$nonceLast = "\x00\x00\x00\x00" .
ParagonIE_Sodium_Core_Util::substr($nonce, 16, 8);
return self::aead_chacha20poly1305_ietf_encrypt($message, $ad, $nonceLast, $subkey);
}