Summery Summery

Expand a key and nonce into a keystream of pseudorandom bytes.

Syntax Syntax

ParagonIE_Sodium_Compat::crypto_stream( int $len, string $nonce, string $key )

Parameters Parameters


(int) (Required) Number of bytes desired


(string) (Required) Number to be used Once; must be 24 bytes


(string) (Required) XSalsa20 key

Return Return

(string) Pseudorandom stream that can be XORed with messages to provide encryption (but not authentication; see Poly1305 or crypto_auth() for that, which is not optional for security)

Source Source

File: wp-includes/sodium_compat/src/Compat.php




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.