array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ru', ), 'this' => array ( 0 => 'function.sodium-crypto-stream-keygen.php', 1 => 'sodium_crypto_stream_keygen', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Функции Sodium', ), 'prev' => array ( 0 => 'function.sodium-crypto-sign.php', 1 => 'sodium_crypto_sign', ), 'next' => array ( 0 => 'function.sodium-crypto-stream-xchacha20-keygen.php', 1 => 'sodium_crypto_stream_xchacha20_keygen', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ru', 'path' => 'reference/sodium/functions/sodium-crypto-stream-keygen.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_stream_keygen — Генерирует случайный ключ sodium_crypto_stream
Создаёт ключ, который используется в sodium_crypto_stream() и sodium_crypto_stream_xor().
У этой функции нет параметров.
Ключ шифрования (256 бит).