Udostępnij przez


RSACng.TrySignHash Metoda

Definicja

Próbuje podpisać skrót przy użyciu bieżącego klucza, pisząc podpis w podanym buforze.

public:
 override bool TrySignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding, [Runtime::InteropServices::Out] int % bytesWritten);
public override bool TrySignHash (ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten);
override this.TrySignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding * int -> bool
Public Overrides Function TrySignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding, ByRef bytesWritten As Integer) As Boolean

Parametry

hash
ReadOnlySpan<Byte>

Wartość skrótu danych do podpisania.

destination
Span<Byte>

Bufor do odbierania podpisu RSA.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu używany do tworzenia wartości skrótu danych.

padding
RSASignaturePadding

Dopełnienie.

bytesWritten
Int32

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

Zwraca

truejeśli destination jest wystarczająco długi, aby otrzymać podpis RSA; w przeciwnym razie . false

Dotyczy