Uredi

Deli z drugimi prek


HMACSHA512.TryHashData Method

Definition

Attempts to compute the HMAC of data using the SHA512 algorithm.

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

Parameters

key
ReadOnlySpan<Byte>

The HMAC key.

source
ReadOnlySpan<Byte>

The data to HMAC.

destination
Span<Byte>

The buffer to receive the HMAC value.

bytesWritten
Int32

When this method returns, contains the total number of bytes written into destination.

Returns

false if destination is too small to hold the calculated hash, true otherwise.

Applies to