CryptographicOperations.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'hash dei dati.
public:
static bool TryHashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryHashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);
static member TryHashData : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Shared Function TryHashData (hashAlgorithm As HashAlgorithmName, source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
Parametri
- hashAlgorithm
- HashAlgorithmName
Algoritmo usato per calcolare l'hash.
- source
- ReadOnlySpan<Byte>
Dati di cui eseguire l'hash.
- bytesWritten
- Int32
Quando termina, il numero totale di byte scritti in destination.
Restituisce
false se destination è troppo piccolo per contenere l'hash calcolato, true in caso contrario.
Eccezioni
hashAlgorithm ha un Name vuoto.
hashAlgorithm ha un Namenull.
hashAlgorithm specifica un algoritmo hash non supportato dalla piattaforma corrente.
hashAlgorithm specifica un algoritmo hash sconosciuto.