protected override byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm) { if (hashAlgorithm != HashAlgorithmName.SHA1) { throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); } return(AsymmetricAlgorithmHelpers.HashData(data, hashAlgorithm)); }
protected override byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm) { // we're sealed and the base should have checked this already Debug.Assert(data != null); Debug.Assert(offset >= 0 && offset <= data.Length); Debug.Assert(count >= 0 && count <= data.Length); Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.Name)); return(AsymmetricAlgorithmHelpers.HashData(data, offset, count, hashAlgorithm)); }
protected override byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm) { if (hashAlgorithm != HashAlgorithmName.SHA1) { // Matching DSACryptoServiceProvider's "I only understand SHA-1/FIPS 186-2" exception throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); } return(AsymmetricAlgorithmHelpers.HashData(data, offset, count, hashAlgorithm)); }
protected override byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm) => AsymmetricAlgorithmHelpers.HashData(data, hashAlgorithm);
protected override byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm) => AsymmetricAlgorithmHelpers.HashData(data, offset, count, hashAlgorithm);