PHP8 sodium_crypto_stream_xchacha20

2024-03-19 10:46 更新

(PHP 8 >= 8.1.0)

sodium_crypto_stream_xchacha20 — 將密鑰和隨機數擴展為偽隨機字節(jié)的密鑰流

說明

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

將 和 擴展為偽隨機字節(jié)的密鑰流。keynonce

參數 

length

所需的字節(jié)數。

nonce

24 字節(jié)隨機數。

key

鍵,可能從 sodium_crypto_stream_xchacha20_keygen() 生成。

返回值 

返回可與 sodium_crypto_stream_xchacha20_xor() 一起使用的偽隨機流。


以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號