HashAlgorithm.HashCore 方法

定义

重载

名称 说明
HashCore(Byte[], Int32, Int32)

在派生类中重写时,将写入对象的数据路由到用于计算哈希的哈希算法中。

HashCore(ReadOnlySpan<Byte>)

将写入对象的数据路由到用于计算哈希的哈希算法中。

HashCore(Byte[], Int32, Int32)

在派生类中重写时,将写入对象的数据路由到用于计算哈希的哈希算法中。

protected:
 abstract void HashCore(cli::array <System::Byte> ^ array, int ibStart, int cbSize);
protected abstract void HashCore(byte[] array, int ibStart, int cbSize);
abstract member HashCore : byte[] * int * int -> unit
Protected MustOverride Sub HashCore (array As Byte(), ibStart As Integer, cbSize As Integer)

参数

array
Byte[]

要计算其哈希代码的输入。

ibStart
Int32

从中开始使用数据的字节数组的偏移量。

cbSize
Int32

要用作数据的字节数组中的字节数。

注解

应用程序代码不调用此方法。

此抽象方法执行哈希计算。 每次写入加密哈希算法都会通过此方法传递数据。 对于每个数据块,此方法更新哈希对象的状态,以便在数据末尾返回正确的哈希值。

适用于

HashCore(ReadOnlySpan<Byte>)

将写入对象的数据路由到用于计算哈希的哈希算法中。

protected:
 virtual void HashCore(ReadOnlySpan<System::Byte> source);
protected virtual void HashCore(ReadOnlySpan<byte> source);
abstract member HashCore : ReadOnlySpan<byte> -> unit
override this.HashCore : ReadOnlySpan<byte> -> unit
Protected Overridable Sub HashCore (source As ReadOnlySpan(Of Byte))

参数

source
ReadOnlySpan<Byte>

要计算其哈希代码的输入。

注解

此方法的默认实现将复制到 source 临时数组和调用 HashCore(Byte[], Int32, Int32)

派生类型应重写此方法以避免中间数据复制。

适用于