Windows apps
Collapse the table of content
Expand the table of content
Information
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.

RSA::VerifyData Method (array<Byte>^, array<Byte>^, HashAlgorithmName, RSASignaturePadding^)

 

Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature.

Namespace:   System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

public:
bool VerifyData(
	array<unsigned char>^ data,
	array<unsigned char>^ signature,
	HashAlgorithmName hashAlgorithm,
	RSASignaturePadding^ padding
)

Parameters

data
Type: array<System::Byte>^

The signed data.

signature
Type: array<System::Byte>^

The signature data to be verified.

hashAlgorithm
Type: System.Security.Cryptography::HashAlgorithmName

The hash algorithm used to create the hash value of the data.

padding
Type: System.Security.Cryptography::RSASignaturePadding^

The padding mode.

Return Value

Type: System::Boolean

true if the signature is valid; otherwise, false.

Exception Condition
ArgumentNullException

data is null.

-or-

signature is null.

-or-

padding is null.

ArgumentException

hashAlgorithm.Name is null or String::Empty.

.NET Framework
Available since 4.6
Return to top
Show:
© 2017 Microsoft