xml.Signature.setKey

Defines the key used for signing or validation.

Syntax

setKey(
   key xml.CryptoKey )
  1. key defines the key to be used for signing or validation.

Usage

Only RSA, DSA or HMAC keys intended for SIGNATURE are allowed.

During the computation of the signature, some key information can be added depending on the feature set on that CryptoKey object. If no features are set, nothing is added. See XML Signature concepts for more details.

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).