xml.Signature.setKey

Defines the key used for signing or validation.

Syntax

setKey(
   key xml.CryptoKey )
  1. key is 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 according to 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 with the appropriate error number.