The Encryption class / xml.Encryption methods |
Encrypts the string str using the RSA key key and returns it encoded in BASE64.
xml.Encryption.RSAEncrypt( key STRING, str STRING ) RETURNING rstr STRING
RSA encryption is only intended to short strings that cannot exceed the size of the RSA key minus 12 bytes. For instance, if you have a RSA key of 512 bits, you password cannot exceed 512/8-12 = 52 bytes. If you need to handle big strings, you must use symmetric keys and the EncryptString method. However, you can use RSA keys to encrypt symmetric key values.
In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.