public void Test(string keyHex, string nonceHex, string associatedDataHex, string tagHex, string plainHex, string cipherHex) { var key = keyHex.FromHex(); Test(new BcXChaCha20Poly1305Crypto(key), nonceHex, associatedDataHex, tagHex, plainHex, cipherHex); Test(AEADCryptoCreate.XChaCha20Poly1305(key), nonceHex, associatedDataHex, tagHex, plainHex, cipherHex); }
protected override IAEADCrypto CreateCrypto(ReadOnlySpan <byte> key) { return(AEADCryptoCreate.XChaCha20Poly1305(key)); }
public override void Init(byte[] key, byte[] iv) => crypto = AEADCryptoCreate.XChaCha20Poly1305(key);
public void Encrypt() { TestEncrypt(AEADCryptoCreate.XChaCha20Poly1305(_randomKey)); }