php8.5
Home/ Manual/ sodium / functions/ sodium_crypto_stream_xchacha20_keygen

sodium_crypto_stream_xchacha20_keygen

PHP function Edit on GitHub ✎

(PHP 8 >= 8.1.0)

Returns a secure random key

Description

sodium_crypto_stream_xchacha20_keygen(): string

Returns a secure random key for use with sodium_crypto_stream_xchacha20().

Parameters Parameters

Return Values

Returns a 32-byte secure random key for use with sodium_crypto_stream_xchacha20().

Source: reference/sodium/functions/sodium-crypto-stream-xchacha20-keygen.xml · from the official PHP manual (php/doc-en)