EVPKey::Verify (open)
Verify a signature
Syntax
LOADLIB "wh::crypto.whlib";
BOOLEAN FUNCTION Verify(STRING data, STRING signature, STRING alg)Parameters
STRING dataThe data to verify the signature for
STRING signatureThe signature to verify
STRING algThe hashing algorithm to use ("MD5", "SHA-1", "SHA-256", "SHA-384", "SHA-512")
Return value
BOOLEANIf the signature is valid for the given data
Description
This function verifies a signature for the given data, using the public key and the given hashing algorithm.
For EC keys, this function expects the signature to be a BER-encoded ASN.1 sequence containing the r and s
signature values. You can use EncodeECSignature to create a verifiable signature.