Esempio n. 1
0
        public virtual KeyPair GenerateKeyPair()
        {
            byte[] secretKey = new byte[KeySize];
            RandomData.GetBytes(secretKey);

            byte[] publickKey = new byte[KeySize];
            curve25519xsalsa20poly1305.crypto_box_getpublickey(publickKey, secretKey);

            return(new KeyPair(publickKey, secretKey));
        }