DSACryptoServiceProvider.SignHash(Byte[], String) Metodo

Definizione

Calcola la firma per il valore hash specificato crittografandolo con la chiave privata.

public:
 cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ rgbHash, System::String ^ str);
public byte[] SignHash(byte[] rgbHash, string? str);
public byte[] SignHash(byte[] rgbHash, string str);
member this.SignHash : byte[] * string -> byte[]
Public Function SignHash (rgbHash As Byte(), str As String) As Byte()

Parametri

rgbHash
Byte[]

Valore hash dei dati da firmare.

str
String

Nome dell'algoritmo hash usato per creare il valore hash dei dati.

Valori restituiti

Byte[]

Firma DSA per il valore hash specificato.

Eccezioni

Il rgbHash parametro è null.

Non è possibile acquisire il provider di servizi di crittografia.The cryptographic service provider (CSP) cannot be acquired.

oppure

Nessuna chiave privata.

Commenti

Questo metodo crea una firma digitale verificata utilizzando il VerifyHash metodo .

DSA usa l'algoritmo SHA1 hash.

Si applica a

Vedi anche