php / 8.1.5 / function.sodium-crypto-stream-xchacha20-keygen.html /

sodium_crypto_stream_xchacha20_keygen

(PHP 8 >= 8.1.0)

sodium_crypto_stream_xchacha20_keygenReturns a secure random key

Description

sodium_crypto_stream_xchacha20_keygen(): string

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

Parameters

This function has no parameters.

Return Values

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

© 1997–2021 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.sodium-crypto-stream-xchacha20-keygen.php