Ejemplo n.º 1
0
        public void Test(string keyHex, string nonceHex, string associatedDataHex, string tagHex, string plainHex, string cipherHex)
        {
            var key = keyHex.FromHex();

            Test(new BcChaCha20Poly1305Crypto(key), nonceHex, associatedDataHex, tagHex, plainHex, cipherHex);
            Test(AEADCryptoCreate.ChaCha20Poly1305(key), nonceHex, associatedDataHex, tagHex, plainHex, cipherHex);
        }
Ejemplo n.º 2
0
 public override void Init(byte[] key, byte[] iv) => crypto = AEADCryptoCreate.ChaCha20Poly1305(key);
Ejemplo n.º 3
0
 public void Encrypt()
 {
     TestEncrypt(AEADCryptoCreate.ChaCha20Poly1305(_randomKey));
 }
 protected override IAEADCrypto CreateCrypto(ReadOnlySpan <byte> key)
 {
     return(AEADCryptoCreate.ChaCha20Poly1305(key));
 }