(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_stream — Generate a deterministic sequence of bytes from a seed
$length
$nonce
$key
Generate a deterministic sequence of bytes from a seed, using the XSalsa20 stream cipher.
length
nonce
key
String of pseudorandom bytes.