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
public bool VerifyData(
 byte[] buffer,
 object halg,
 byte[] signature
public: bool VerifyData(
 unsigned char buffer __gc[],
 Object* halg,
 unsigned char signature __gc[]
public function VerifyData(
   buffer : Byte[],
 halg : Object,
 signature : Byte[]
) : Boolean;


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

Return Value

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


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


This method verifies the RSA digital signature produced by SignData.

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


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

© 2014 Microsoft