public static function generateKeypair() : Keypair
    {
        try {
            $keypair = \sodium_crypto_box_keypair();
            return new Keypair(
                \sodium_crypto_box_secretkey($keypair),
                \sodium_crypto_box_publickey($keypair)
            );
        } catch (SodiumException $e) {
            throw new Exception($e->getMessage());
        }
    }
public static function generateKeypair() : Keypair
    {
        try {
            $keypair = \sodium_crypto_box_keypair();
            return new Keypair(
                \sodium_crypto_box_secretkey($keypair),
                \sodium_crypto_box_publickey($keypair)
            );
        } catch (SodiumException $e) {
            throw new Exception($e->getMessage());
        }
    }
public static function generateKeypair ( ) : Keypair { try { $ keypair = \ sodium_crypto_box_keypair ( ) ; return new Keypair ( \ sodium_crypto_box_secretkey ( $ keypair ) , \ sodium_crypto_box_publickey ( $ keypair ) ) ; } catch ( SodiumException $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } }
Generates a crypto keypair

@return \ncryptf\Keypair
Generates a crypto keypair