HMAC.TryHashFinal(Span<Byte>, Int32) 方法

定義

在 HMAC 演算法處理最後一筆資料之後,嘗試完成 HMAC 計算。

protected:
 override bool TryHashFinal(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
protected override bool TryHashFinal (Span<byte> destination, out int bytesWritten);
override this.TryHashFinal : Span<byte> * int -> bool
Protected Overrides Function TryHashFinal (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

參數

destination
Span<Byte>

要接收 HMAC 值的緩衝區。

bytesWritten
Int32

當此方法傳回時,為寫入 destination 的位元組總數。 這個參數會被視為未初始化。

傳回

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

例外狀況

此方法不會在衍生類型中覆寫。

備註

此方法的預設實作會擲回 , PlatformNotSupportedException 因為 HMAC 沒有 Managed 實作。

衍生型別必須覆寫這個方法。

適用於