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

定义

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

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到的字节总数。 此参数被视为未初始化。

返回

true 如果 destination 足够长,无法接收哈希或 HMAC 值,则为 ;否则为 false

例外

对象已释放。

适用于