Share via


DSACryptoServiceProvider.SignHash(Byte[], String) 方法

定義

使用私密金鑰進行加密,為指定的雜湊值計算出簽章。

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()

參數

rgbHash
Byte[]

要簽署之資料的雜湊值。

str
String

用以建立該資料雜湊值的雜湊演算法名稱。

傳回

Byte[]

指定雜湊值的 DSA 簽章。

例外狀況

rgbHash 參數為 null

無法取得密碼編譯服務提供者 (CSP)。

-或-

沒有私密金鑰。

備註

這個方法會建立使用 VerifyHash 方法驗證的數字簽名。

DSASHA1會使用哈希演算法。

適用於

另請參閱