public static IncrementalHash CreateHash(HashAlgorithmName hashAlgorithm) { if (string.IsNullOrEmpty(hashAlgorithm.Name)) throw new ArgumentException(SR.Cryptography_HashAlgorithmNameNullOrEmpty, nameof(hashAlgorithm)); return new IncrementalHash(hashAlgorithm, GetHashAlgorithm(hashAlgorithm)); }
public SHA256CryptoServiceProvider() { _incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256); HashSizeValue = HashSizeBits; }