Ejemplo n.º 1
0
        public void Decrypt(Tests.Vectors.XChaCha20Poly1305TestVector test)
        {
            var aead      = new XChaCha20Poly1305(test.Key);
            var plaintext = new byte[test.CipherText.Length];

            aead.Decrypt(test.Nonce, test.CipherText, test.Tag, plaintext, test.Aad);
        }
Ejemplo n.º 2
0
        public byte[] Decrypt(Tests.Vectors.XChaCha20Poly1305TestVector test)
        {
            var aead = new XChaCha20Poly1305(test.Key);

            return(aead.Decrypt(CryptoBytes.Combine(test.Nonce, test.CipherText, test.Tag), test.Aad));
        }