xml.Encryption.EncryptString

Encrypts the specified string using the symmetric key, and returns the encrypted string encoded in BASE64.

Syntax

xml.Encryption.EncryptString(
   key xml.CryptoKey,
   str STRING )
  RETURNS STRING
  1. key defines the key.
  2. str defines the string to be encrypted.

Usage

This method encrypts the string specified in str using the symmetric key defined by key, and returns the encrypted string encoded in BASE64.

The key's usage must be for encryption, see Supported kind of keys.

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