DSACryptoServiceProvider.VerifyHash(Byte[], String, Byte[]) 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.
Verifies the specified signature data by comparing it to the signature computed for the specified hash value.
public:
bool VerifyHash(cli::array <System::Byte> ^ rgbHash, System::String ^ str, cli::array <System::Byte> ^ rgbSignature);
public bool VerifyHash (byte[] rgbHash, string? str, byte[] rgbSignature);
public bool VerifyHash (byte[] rgbHash, string str, byte[] rgbSignature);
member this.VerifyHash : byte[] * string * byte[] -> bool
Public Function VerifyHash (rgbHash As Byte(), str As String, rgbSignature As Byte()) As Boolean
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.
- rgbSignature
- Byte[]
The signature data to be verified.
Returns
true
if the signature verifies as valid; otherwise, false
.
Exceptions
The cryptographic service provider (CSP) cannot be acquired.
-or-
The signature cannot be verified.
Remarks
This method verifies the DSA digital signature produced by SignHash.
If the str
parameter is null
, the default hash algorithm (SHA1) is used. The valid hash algorithms is SHA1.
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für