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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om