IncrementalHash.GetCurrentHash 方法

定义

重载

GetCurrentHash()

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

GetCurrentHash(Span<Byte>)

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

GetCurrentHash()

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

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

返回

Byte[]

计算所得的哈希或 HMAC。The computed hash or HMAC.

例外

对象已被释放。The object has already been disposed.

适用于

GetCurrentHash(Span<Byte>)

在哈希或基于哈希的消息验证码 (HMAC) 中检索从之前对 AppendData(ReadOnlySpan<Byte>) 方法的调用中累积的数据,并将对象重置为初始状态。Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

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

参数

destination
Span<Byte>

用于接收哈希值或 HMAC 值的缓冲区。The buffer to receive the hash or HMAC value.

返回

Int32

写入到 destination 的字节数。The number of bytes written to destination.

例外

destinationLength 值小于 HashLengthInBytesdestination has a Length value less than HashLengthInBytes.

对象已被释放。The object has already been disposed.

适用于