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