IncrementalHash.TryGetCurrentHash(Span<Byte>, Int32) 方法

定义

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

public:
 bool TryGetCurrentHash(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryGetCurrentHash (Span<byte> destination, out int bytesWritten);
member this.TryGetCurrentHash : Span<byte> * int -> bool
Public Function TryGetCurrentHash (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

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

bytesWritten
Int32

此方法返回时,为写入 destination 的字节总数。 该参数未经初始化即被处理。

返回

Boolean

destination 的长度不足以接收哈希或 HMAC 值,则为 true;否则为 false

例外

对象已被释放。

适用于