Share via


VerifyData Method (Byte[], HashAlgorithm, Byte[])

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the hash value of the provided data.

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

Syntax

'Declaration
Public Function VerifyData ( _
    buffer As Byte(), _
    halg As HashAlgorithm, _
    signature As Byte() _
) As Boolean
public bool VerifyData(
    byte[] buffer,
    HashAlgorithm halg,
    byte[] signature
)
public:
bool VerifyData(
    array<unsigned char>^ buffer, 
    HashAlgorithm^ halg, 
    array<unsigned char>^ signature
)
member VerifyData : 
        buffer:byte[] * 
        halg:HashAlgorithm * 
        signature:byte[] -> bool 
public function VerifyData(
    buffer : byte[], 
    halg : HashAlgorithm, 
    signature : byte[]
) : boolean

Parameters

Return Value

Type: System. . :: . .Boolean
true if the signature is valid; otherwise, false.

.NET Framework Security

See Also

Reference

RSACryptoServiceProvider Class

VerifyData Overload

System.Security.Cryptography Namespace