Back to product page

Verify method


Verifies signature of the signed Blob.

Type

A Boolean value. True if signature matches, False if signature is invalid.

Syntax

  • Basic
object.Verify (Data, Signature)
The Verify(object,Data,Signature) syntax has these parts:
objectAn expression evaluating to an object of type wodCrypt.
DataRequired. A Blob object. Contains readable (plaintext) data - same as the one signed by the other party.
SignatureRequired. A Blob object. Contains signature received from other party.

Remarks

The Verify method will use one of the selected algorithms (RSA or DSA) with MD5 digest, together with readable data and the owner's digital signature to verify if the signature is correct. As a result, a Boolean value True/False will be returned from the calculation. To verify the signature, you must have the public key of the owner set in the SecretKey property. If you wish to use SHA1 digest instead of MD5, you should use RSA+SHA1 or DSA+SHA1 constants.

You should receive the PublicKey from the owner - you cannot generate one by yourself. This is because the public key is derived from the owner's private key - which only the real owner possesses.

Code sample

  • Basic

Platforms

Windows