语言

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 数字签名。

DSA SHA1使用哈希算法。

适用于

另请参阅