Exemplo n.º 1
0
        private static void ConfigureAes128GcmCipher(GcmBlockCipher aes128GcmCipher, bool forEncryption, byte[] pseudorandomKey, byte[] contentEncryptionKey, ulong recordSequenceNumber)
        {
            aes128GcmCipher.Reset();
            AeadParameters aes128GcmParameters = new AeadParameters(new KeyParameter(contentEncryptionKey), 128, GetNonce(pseudorandomKey, recordSequenceNumber));

            aes128GcmCipher.Init(forEncryption, aes128GcmParameters);
        }
Exemplo n.º 2
0
 public void Reset()
 {
     cipher.Reset();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <param name="disposing"></param>
 protected override void Dispose(bool disposing)
 {
     _keyParm = null;
     _cipher.Reset();
     AesKeyBytes = AesKeyBytes.Clear();
 }