xml.Signature.verifyString

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

Syntax

verifyString(
   key xml.CryptoKey,
   signedStr STRING,
   signature STRING )
  RETURNING flag INTEGER
  1. key is the key to use for verification.
  2. signedStr is the signed string in its clear form.
  3. signature is 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 with the appropriate error number.