codecamp

PHP8 sodium_crypto_stream_xchacha20

(PHP 8 >= 8.1.0)

sodium_crypto_stream_xchacha20 — 将密钥和随机数扩展为伪随机字节的密钥流

说明

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

将 和 扩展为伪随机字节的密钥流。keynonce

参数 

length

所需的字节数。

nonce

24 字节随机数。

key

键,可能从 sodium_crypto_stream_xchacha20_keygen() 生成。

返回值 

返回可与 sodium_crypto_stream_xchacha20_xor() 一起使用的伪随机流。


PHP8 sodium_crypto_stream_xchacha20_xor
PHP8 sodium_crypto_stream_xor
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定