HMACSHA256.TryHashData Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Tenta di calcolare l'HMAC dei dati usando l'algoritmo SHA256.
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
Parametri
- key
- ReadOnlySpan<Byte>
Chiave HMAC.
- source
- ReadOnlySpan<Byte>
Dati in HMAC.
- bytesWritten
- Int32
Al termine di questo metodo, il numero totale di byte scritti in destination.
Restituisce
false se destination è troppo piccolo per mantenere l'hash calcolato, in caso contrario true.