DSACryptoServiceProvider.SignHash(Byte[], String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Computes the signature for the specified hash value by encrypting it with the private key.
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()
Parameters
- rgbHash
- Byte[]
The hash value of the data to be signed.
- str
- String
The name of the hash algorithm used to create the hash value of the data.
Returns
The DSA signature for the specified hash value.
Exceptions
The rgbHash
parameter is null
.
The cryptographic service provider (CSP) cannot be acquired.
-or-
There is no private key.
Remarks
This method creates a digital signature that is verified using the VerifyHash method.
DSA uses the SHA1 hash algorithm.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈