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); }
public void Reset() { cipher.Reset(); }
/// <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(); }