sodium_crypto_stream_xchacha20

秘密鍵と nonce を、疑似ランダムなバイト列の鍵ストリームに展開する

説明

string sodium_crypto_stream_xchacha20(int $length, string $nonce, string $key)

keynonce を 疑似ランダムなバイト列の鍵ストリームに展開します。

パラメータ

length

バイト列の長さ。

nonce

24バイト長の nonce。

key

秘密鍵。 sodium_crypto_stream_xchacha20_keygen によって生成されたものです。

戻り値

sodium_crypto_stream_xchacha20_xor で使う、疑似ランダムなバイト列のストリームを返します。