xml.Signature.signString

Sign the passed string according to the specified key.

Syntax

signString(
  key xml.CryptoKey,
  strToSign STRING
 )
 RETURNING sig STRING
  1. key is the key to be used for the signature.
  2. strToSign is the string to be sign.

Usage

The key can be a HMAC key, a RSA private key or a DSA private key. The signing process is performed with SHA-1 digest, as recommended by the XmlSec specification.

Returns sig, or the signature in base64 format.

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.