The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
RSACryptoServiceProvider::VerifyHash Method (array<Byte>^, array<Byte>^, HashAlgorithmName, RSASignaturePadding^)
Verifies that a digital signature is valid by determining the hash value in the signature using the specified hashing algorithm and padding, and comparing it to the provided hash value.
Assembly: mscorlib (in mscorlib.dll)
public: virtual bool VerifyHash( array<unsigned char>^ hash, array<unsigned char>^ signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding^ padding ) override
Parameters
- hash
-
Type:
array<System::Byte>^
The hash value of the signed data.
- signature
-
Type:
array<System::Byte>^
The signature data to be verified.
- hashAlgorithm
-
Type:
System.Security.Cryptography::HashAlgorithmName
The hash algorithm name used to create the hash value.
- padding
-
Type:
System.Security.Cryptography::RSASignaturePadding^
The padding.
| Exception | Condition |
|---|---|
| ArgumentException | hashAlgorithm is null or String::Empty. |
| ArgumentNullException | hash is null. -or- padding is null. |
| CryptographicException | padding does not equal RSASignaturePadding::Pkcs1. |
.NET Framework
Available since 4.6
Available since 4.6
Show: