语言

NonCryptographicHashAlgorithm.GetHashAndResetCore(Span<Byte>) 方法

定义

写入计算的哈希值,然后 destination 清除累积状态。

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

参数

destination
Span<Byte>

接收计算哈希值的缓冲区。

注解

此方法的实现必须将完全 HashLengthInBytes 字节 destination写入 。 不要假定缓冲区是零初始化的。

该 NonCryptographicHashAlgorithm 类在调用此方法之前验证缓冲区的大小,并将跨度切成完全 HashLengthInBytes 长度。

此方法 GetCurrentHashCore(Span<Byte>) 的默认实现后跟 Reset()。 此方法的重写不需要调用上述任一方法,但必须确保调用方无法观察行为的差异。

适用于