DSA.HashData 方法

定义

计算二进制数据的哈希值。Computes the hash value of binary data.

重载

HashData(Stream, HashAlgorithmName)

在派生类中被重写时,使用指定的哈希算法计算指定的二进制流的哈希值。When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm.

HashData(Byte[], Int32, Int32, HashAlgorithmName)

在派生类中被重写时,使用指定的哈希算法计算字节数组指定部分的哈希值。When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm.

HashData(Stream, HashAlgorithmName)

在派生类中被重写时,使用指定的哈希算法计算指定的二进制流的哈希值。When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm.

protected:
 virtual cli::array <System::Byte> ^ HashData(System::IO::Stream ^ data, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
protected virtual byte[] HashData (System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member HashData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.HashData : System.IO.Stream * System.Security.Cryptography.HashAlgorithmName -> byte[]
Protected Overridable Function HashData (data As Stream, hashAlgorithm As HashAlgorithmName) As Byte()

参数

data
Stream

要进行哈希处理的二进制流。The binary stream to hash.

hashAlgorithm
HashAlgorithmName

要用于对数据进行哈希处理的算法。The algorithm to use to hash the data.

返回

Byte[]

经过哈希处理的数据。The hashed data.

异常

派生方法必须重写此方法。A derived class must override this method.

HashData(Byte[], Int32, Int32, HashAlgorithmName)

在派生类中被重写时,使用指定的哈希算法计算字节数组指定部分的哈希值。When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm.

protected:
 virtual cli::array <System::Byte> ^ HashData(cli::array <System::Byte> ^ data, int offset, int count, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
protected virtual byte[] HashData (byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
abstract member HashData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
override this.HashData : byte[] * int * int * System.Security.Cryptography.HashAlgorithmName -> byte[]
Protected Overridable Function HashData (data As Byte(), offset As Integer, count As Integer, hashAlgorithm As HashAlgorithmName) As Byte()

参数

data
Byte[]

要进行哈希处理的数据。The data to be hashed.

offset
Int32

data 中要进行哈希处理的第一个字节的索引。The index of the first byte in data that is to be hashed.

count
Int32

要进行哈希处理的字节数。The number of bytes to hash.

hashAlgorithm
HashAlgorithmName

要用于对数据进行哈希处理的算法。The algorithm to use to hash the data.

返回

Byte[]

经过哈希处理的数据。The hashed data.

异常

派生方法必须重写此方法。A derived class must override this method.

适用于