protected HashData ( Stream data, HashAlgorithmName hashAlgorithm ) : byte[] | ||
data | Stream | |
hashAlgorithm | HashAlgorithmName | |
리턴 | 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);
}
DSACryptoServiceProvider::HashData ( byte data, int offset, int count, HashAlgorithmName hashAlgorithm ) : byte[] |