sodium_crypto_kx_keypair
PHP 7 >= 7.2.0, PHP 8
sodium_crypto_kx_keypair - Creates a new sodium keypair
Manual
sodium_crypto_kx_keypair(
): string
Create a new sodium keypair consisting of the secret key (32 bytes) followed by the public key (32 bytes). The keys can be retrieved by calling sodium_crypto_kx_secretkey and sodium_crypto_kx_publickey, respectively.
Parameters
This function has no parameters.
Return Values
Returns the new keypair on success; throws an exception otherwise.