RSACng.TrySignHash Método

Definición

Intenta firmar el hash con la clave actual, escribiendo la firma en un búfer proporcionado.

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

Parámetros

hash
ReadOnlySpan<Byte>

Valor hash de los datos que se van a firmar.

destination
Span<Byte>

Búfer que va a recibir la firma RSA.

hashAlgorithm
HashAlgorithmName

Algoritmo hash usado para crear el valor hash de los datos.

padding
RSASignaturePadding

Relleno.

bytesWritten
Int32

Cuando este método devuelve un valor, el número total de bytes escritos en destination. Este parámetro se trata como sin inicializar.

Devoluciones

Es true si destination es lo suficientemente largo como para recibir la firma RSA; de lo contrario, es false.

Se aplica a