Export (0) Print
Expand All

RSACryptoServiceProvider.VerifyData Method

Verifies the specified signature data by comparing it to the signature computed for the specified data.

[Visual Basic]
Public Function VerifyData( _
   ByVal buffer() As Byte, _
   ByVal halg As Object, _
   ByVal signature() As Byte _
) As Boolean
[C#]
public bool VerifyData(
 byte[] buffer,
 object halg,
 byte[] signature
);
[C++]
public: bool VerifyData(
 unsigned char buffer __gc[],
 Object* halg,
 unsigned char signature __gc[]
);
[JScript]
public function VerifyData(
   buffer : Byte[],
 halg : Object,
 signature : Byte[]
) : Boolean;

Parameters

buffer
The data that was signed.
halg
The name of the hash algorithm used to create the hash value of the data.
signature
The signature data to be verified.

Return Value

true if the signature verifies as valid; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException The halg parameter is a null reference (Nothing in Visual Basic).
ArgumentException The halg parameter is not a valid type.

Remarks

This method verifies the RSA digital signature produced by SignData.

The halg parameter can accept a String, a HashAlgorithm, or a Type.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RSACryptoServiceProvider Class | RSACryptoServiceProvider Members | System.Security.Cryptography Namespace | Cryptographic Services

Show:
© 2014 Microsoft