コード例 #1
0
    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);
    }
コード例 #2
0
 protected override IAEADCrypto CreateCrypto(ReadOnlySpan <byte> key)
 {
     return(AEADCryptoCreate.XChaCha20Poly1305(key));
 }
コード例 #3
0
 public override void Init(byte[] key, byte[] iv) => crypto = AEADCryptoCreate.XChaCha20Poly1305(key);
コード例 #4
0
 public void Encrypt()
 {
     TestEncrypt(AEADCryptoCreate.XChaCha20Poly1305(_randomKey));
 }