xml.Encryption.setKeyEncryptionKey
Assigns a copy of the key-encryption key to this encryption object.
Syntax
setKeyEncryptionKey(
key xml.CryptoKey )
- key defines the key-encryption key.
Usage
Any further XML encryption will use that key-encryption key to encrypt the symmetric key set with
setKey()
within the resulting XML, and any further XML decryption will use that
key-encryption key to decrypt the embedded symmetric key.-
NULL is allowed, meaning that embedded symmetric keys will not be encrypted nor decrypted anymore, assuming that they have been exchanged in another way.
-
Only public or private RSA keys, or key-wrap keys are allowed.
-
Public RSA keys can encrypt but not decrypt.
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).