ParagonIE_Sodium_Core_XChaCha20::ietfStreamXorIc() public WP 1.0
{} It's a method of the class: ParagonIE_Sodium_Core_XChaCha20{}
No Hooks.
Return
String
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Core_XChaCha20::ietfStreamXorIc( $message, $nonce, $key, $ic );
- $message(string) (required)
- -
- $nonce(string)
- -
- $key(string)
- -
- $ic(string)
- -
Code of ParagonIE_Sodium_Core_XChaCha20::ietfStreamXorIc() ParagonIE Sodium Core XChaCha20::ietfStreamXorIc WP 5.7
public static function ietfStreamXorIc($message, $nonce = '', $key = '', $ic = '')
{
if (self::strlen($nonce) !== 24) {
throw new SodiumException('Nonce must be 24 bytes long');
}
return self::encryptBytes(
new ParagonIE_Sodium_Core_ChaCha20_IetfCtx(
self::hChaCha20(self::substr($nonce, 0, 16), $key),
"\x00\x00\x00\x00" . self::substr($nonce, 16, 8),
$ic
),
$message
);
}