System.Security.Cryptography.HashAlgorithm.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

HashAlgorithm::Dispose ( bool disposing ) : void

Usage Example

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                _hash?.Dispose();

                if (_baseValue != null)
                {
                    Array.Clear(_baseValue, 0, _baseValue.Length);
                }

                if (_extra != null)
                {
                    Array.Clear(_extra, 0, _extra.Length);
                }

                if (_password != null)
                {
                    Array.Clear(_password, 0, _password.Length);
                }

                if (_salt != null)
                {
                    Array.Clear(_salt, 0, _salt.Length);
                }
            }
        }
All Usage Examples Of System.Security.Cryptography.HashAlgorithm::Dispose