IncrementalHash.GetHashAndReset 方法

定义

重载

GetHashAndReset()

在哈希或基于哈希的消息验证代码 (HMAC) 中检索从之前对 AppendData 方法的调用中累积的数据,并将对象重置为初始状态。

GetHashAndReset(Span<Byte>)

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。

GetHashAndReset()

在哈希或基于哈希的消息验证代码 (HMAC) 中检索从之前对 AppendData 方法的调用中累积的数据,并将对象重置为初始状态。

public:
 cli::array <System::Byte> ^ GetHashAndReset();
public byte[] GetHashAndReset ();
member this.GetHashAndReset : unit -> byte[]
Public Function GetHashAndReset () As Byte()

返回

Byte[]

计算所得的哈希或 HMAC。

例外

适用于

GetHashAndReset(Span<Byte>)

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。

public:
 int GetHashAndReset(Span<System::Byte> destination);
public int GetHashAndReset (Span<byte> destination);
member this.GetHashAndReset : Span<byte> -> int
Public Function GetHashAndReset (destination As Span(Of Byte)) As Integer

参数

destination
Span<Byte>

用于接收哈希值或 HMAC 值的缓冲区。

返回

Int32

写入到 destination 的字节数。

例外

destinationLength 值小于 HashLengthInBytes

对象已被释放。

适用于