sodium_crypto_stream
sodium_crypto_stream
Generate a deterministic sequence of bytes from a seed
string **sodium_crypto_stream** int $length string $nonce string $key
Generate a deterministic sequence of bytes from a seed, using the XSalsa20 stream cipher.
lengthThe number of bytes to return.
nonce
A number that must be only used once, per message. 24 bytes long.
This is a large enough bound to generate randomly (i.e. ).
random_bytes
keyEncryption key (256-bit).
String of pseudorandom bytes.