ParagonIE_Sodium_Compat::crypto_stream

Advertisement

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

$len

(int) (Required) Number of bytes desired

$nonce

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

$key

(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


			

Advertisement

Advertisement

Leave a Reply

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