« sodium_crypto_stream_keygen
sodium_crypto_stream_xchacha20_keygen »

sodium_crypto_stream_xchacha20

(PHP 8 >= 8.1.0)

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

説明

function sodium_crypto_stream_xchacha20(int $length, string $nonce, #[\SensitiveParameter] string $key): string

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

パラメータ

length

バイト列の長さ。

nonce

24バイト長の nonce。

key

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

戻り値

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

関連キーワード:
nonce   バイト   sodium   crypto   stream   xchacha   疑似   ランダム   ストリーム   秘密   展開   keygen   length   Sodium   SensitiveParameter
関連する関数・ページ:
function.sodium-crypto-stream-xchacha20-keygen   function.sodium-crypto-stream-xchacha20-xor   function.sodium-crypto-stream-xchacha20-xor-ic   function.sodium-crypto-stream   function.sodium-crypto-stream-keygen   function.sodium-crypto-secretstream-xchacha20poly1305-keygen