ECDsa.TrySignData Método

Definición

Sobrecargas

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Intenta calcular la firma digital ECDSA del intervalo de bytes de solo lectura especificado en el destino proporcionado mediante el algoritmo hash especificado y la clave actual.

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

Intenta crear la firma ECDSA para los datos especificados en el formato indicado en el búfer proporcionado.

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Intenta calcular la firma digital ECDSA del intervalo de bytes de solo lectura especificado en el destino proporcionado mediante el algoritmo hash especificado y la clave actual.

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

Parámetros

data
ReadOnlySpan<Byte>

Datos que van a firmar.

destination
Span<Byte>

Búfer que va a recibir la firma.

hashAlgorithm
HashAlgorithmName

Algoritmo hash que se va a aplicar a los datos para la firma.

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

Boolean

false si destination no es lo suficientemente largo para recibir la firma.

Se aplica a

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

Intenta crear la firma ECDSA para los datos especificados en el formato indicado en el búfer proporcionado.

public:
 bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);
member this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat * int -> bool
Public Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat, ByRef bytesWritten As Integer) As Boolean

Parámetros

data
ReadOnlySpan<Byte>

Datos para aplicar un algoritmo hash y firmar.

destination
Span<Byte>

Búfer que va a recibir la firma.

hashAlgorithm
HashAlgorithmName

Algoritmo hash que se va a usar para crear el valor hash.

signatureFormat
DSASignatureFormat

El formato de codificación que se va a usar para la firma.

bytesWritten
Int32

El resultado que devuelve este método contiene un valor que indica el número de bytes escritos en destination. Este parámetro se trata como sin inicializar.

Devoluciones

Boolean

true si destination es lo suficientemente grande como para recibir la firma; en caso contrario, false.

Excepciones

signatureFormat no es un formato conocido.

hashAlgorithm tiene null o Name vacío.

Error en la operación de firma.

Se aplica a