/// <summary>Creates a new key pair based on a random seed.</summary> /// <returns>A KeyPair.</returns> public static KeyPair GenerateKeyPair() { var publicKey = new byte[PublicKeyBytes]; var privateKey = new byte[SecretKeyBytes]; SodiumLibrary.crypto_box_keypair(publicKey, privateKey); return(new KeyPair(publicKey, privateKey)); }