HMACSHA384.TryHashData 方法

定義

嘗試使用 SHA384 演算法計算資料的 HMAC。

public:
 static bool TryHashData(ReadOnlySpan<System::Byte> key, ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryHashData (ReadOnlySpan<byte> key, ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);
static member TryHashData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Shared Function TryHashData (key As ReadOnlySpan(Of Byte), source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

參數

key
ReadOnlySpan<Byte>

HMAC 鍵。

source
ReadOnlySpan<Byte>

HMAC 的資料。

destination
Span<Byte>

要接收 HMAC 值的緩衝區。

bytesWritten
Int32

當此方法傳回時,為寫入 destination 的位元組總數。

傳回

Boolean

如果 destination 太小而無法保存計算的雜湊,則為 false;否則為 true

適用於