System.Security.Cryptography.DSACryptoServiceProvider.HashData C# (CSharp) Method

HashData() protected method

protected HashData ( Stream data, HashAlgorithmName hashAlgorithm ) : byte[]
data Stream
hashAlgorithm HashAlgorithmName
return byte[]
        protected override byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm)
        {
            // we're sealed and the base should have checked this before calling us
            Debug.Assert(data != null);
            Debug.Assert(!string.IsNullOrEmpty(hashAlgorithm.Name));

            if (hashAlgorithm != HashAlgorithmName.SHA1)
            {
                throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
            }

            return _sha1.ComputeHash(data);
        }

Same methods

DSACryptoServiceProvider::HashData ( byte data, int offset, int count, HashAlgorithmName hashAlgorithm ) : byte[]