ParagonIE_Sodium_Core32_XChaCha20::stream() public WP 1.0
{} Это метод класса: ParagonIE_Sodium_Core32_XChaCha20{}
Хуков нет.
Возвращает
Строку.
Использование
$result = ParagonIE_Sodium_Core32_XChaCha20::stream( $len, $nonce, $key );
- $len(число)
- -
- $nonce(строка)
- -
- $key(строка)
- -
Код ParagonIE_Sodium_Core32_XChaCha20::stream() ParagonIE Sodium Core32 XChaCha20::stream WP 5.6.2
public static function stream($len = 64, $nonce = '', $key = '')
{
if (self::strlen($nonce) !== 24) {
throw new SodiumException('Nonce must be 24 bytes long');
}
return self::encryptBytes(
new ParagonIE_Sodium_Core32_ChaCha20_Ctx(
self::hChaCha20(
self::substr($nonce, 0, 16),
$key
),
self::substr($nonce, 16, 8)
),
str_repeat("\x00", $len)
);
}