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); }
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)); }