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 的位元組總數。 這個參數會被視為未初始化。

傳回

如果 destination 的長度足以接收雜湊或 HMAC 值,則為 true;否則為 false

例外狀況

物件已經處置。

適用於