Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                _disposed = true;
                _readCipher?.Dispose();
                _readCipher = null;

                CipherLib?.Dispose();
                CipherLib = null;
            }
        }
Ejemplo n.º 2
0
 public void Add(ICipher cipher)
 {
     try
     {
         EnsureObjectNotDisposed();
         _list.Add(cipher);
     }
     catch (Exception)
     {
         cipher.Dispose();
         throw;
     }
 }
Ejemplo n.º 3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_canDisposeStream)
                {
                    _stream?.Dispose();
                }
                _stream = null;

                _cipher?.Dispose();
                _cipher = null;
            }
            base.Dispose(disposing);
        }