ECDsa.TryHashData Metoda

Definicja

Próbuje obliczyć wartość skrótu określonego zakresu bajtów tylko do odczytu do podanego miejsca docelowego przy użyciu określonego algorytmu tworzenia skrótów.

protected:
 virtual bool TryHashData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
protected virtual bool TryHashData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TryHashData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TryHashData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Protected Overridable Function TryHashData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, ByRef bytesWritten As Integer) As Boolean

Parametry

data
ReadOnlySpan<Byte>

Dane, które mają zostać skrótowe.

destination
Span<Byte>

Bufor do odbierania wartości skrótu.

hashAlgorithm
HashAlgorithmName

Algorytm używany do tworzenia skrótów danych.

bytesWritten
Int32

Gdy ta metoda zwróci wartość , całkowita liczba bajtów zapisanych w destinationpliku . Ten parametr jest traktowany jako niezainicjowany.

Zwraca

false jeśli destination wartość skrótu nie jest wystarczająco długa.

Uwagi

Domyślną implementacją tej metody jest wywołanie HashData(Byte[], Int32, Int32, HashAlgorithmName) i skopiowanie wyniku do destination. Typy pochodne powinny zastąpić tę metodę, aby uniknąć tworzenia tablicy pośredniej.

Dotyczy