xml.Signature.verifyString

Verify the signature is consistent with the given key and the original message.

Syntax

verifyString(
   key xml.CryptoKey,
   originalStr STRING,
   signature STRING )
  RETURNS INTEGER
  1. key defines the key to use for verification.
  2. originalStr defines the signed string in its clear form.
  3. toBeVerifiedStr defines the signature to be verified.

Usage

The key can be a HMAC key, a RSA private key or a DSA private key. The HMAC key must be the same as the one used for signing. The public RSA and DSA key must be the public key corresponding to the private key used for signing.

Returns 1 when verification is successful; 0 (zero) is returned if verification fails.

This method does not belong to the XML encryption specification.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).