lr.encryptEx
Encrypts a string.
Syntax
lr.encryptEx( Plaintext );
Arguments
Argument | Comments |
---|---|
Plaintext | The string to encrypt. |
The lr.encryptEx function is used to encrypt messages. Encryption is based on the AES-256-GCM algorithm and is compliant with FIPS requirements. The encrypted string can be decrypted by lr.decryptEx.
The AES key must be set before this function can be used. For details, see Add an AES key in the Help Center.
Tip: You can encrypt a string in the script using the same encryption method, by right-clicking the string and selecting Encrypt String (Stronger Encryption). The string is encrypted and inserted as an argument of lr.decryptEx.
Return Values
This function returns an encrypted string.
Parameterization
The argument Plaintext can be parameterized.
Example
function Action()
{
let ciphertext = "hello world!";
let encrypted = lr.encryptEx(ciphertext);
let result = lr.decryptEx(encrypted);
lr.outputMessage(result);
return 0;
}