xml.Encryption.encryptKey

Encrypts the given symmetric or HMAC key as an encrypted-key node and returns it as root node of a new XML document.

Syntax

encryptKey(
   symkey xml.CryptoKey )
  RETURNS xml.DomDocument
  1. symkey defines the given symmetric or HMAC key as an EncryptedKey node.

Usage

This method encrypts the symmetric or HMAC key given in symkey as an encrypted-key node and returns it as root node of a new XML document. The encryption key must have been set otherwise it will fail.

Depending on the feature set on the key-encryption key, the returned XML document will contain an additional KeyInfo node.

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