sodium_crypto_secretbox_keygen
PHP 7 >= 7.2.0, PHP 8
sodium_crypto_secretbox_keygen - Generate random key for sodium_crypto_secretbox
Manual
sodium_crypto_secretbox_keygen(
): string
Generate a key for use with sodium_crypto_secretbox and sodium_crypto_secretbox_open.
Parameters
This function has no parameters.
Return Values
Returns the generated string of cryptographically secure random bytes.