(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_stream — Generate a deterministic sequence of bytes from a seed
$length, string $nonce, #[\SensitiveParameter] string $key): stringGenerate a deterministic sequence of bytes from a seed, using the XSalsa20 stream cipher.
lengthnoncekeyString of pseudorandom bytes.