private IncrementalHash(HashAlgorithmName name, HashProvider hash) { Debug.Assert(name != null); Debug.Assert(!string.IsNullOrEmpty(name.Name)); Debug.Assert(hash != null); _algorithmName = name; _hash = hash; }
public Implementation() { _hashProvider = HashProviderDispenser.CreateHashProvider(HashAlgorithmNames.SHA1); }
public Implementation() { _hashProvider = HashProviderDispenser.CreateHashProvider(HashAlgorithmNames.SHA256); HashSizeValue = _hashProvider.HashSizeInBytes * 8; }
/// <summary> /// Release all resources used by the current instance of the /// <see cref="IncrementalHash"/> class. /// </summary> public void Dispose() { _disposed = true; if (_hash != null) { _hash.Dispose(); _hash = null; } if (_hmac != null) { _hmac.Dispose(true); _hmac = null; } }
public SHA512Managed() { _hashProvider = HashProviderDispenser.CreateHashProvider(HashAlgorithmNames.SHA512); }
public SHA1Managed() { _hashProvider = HashProviderDispenser.CreateHashProvider(HashAlgorithmNames.SHA1); HashSizeValue = _hashProvider.HashSizeInBytes * 8; }