lr_encrypt_ex
Encrypts a string.
char* lr_encrypt_ex(const char* plaintext);
Arguments
| Name | Comments |
|---|---|
| plaintext | The string to encrypt. |
The lr_encrypt_ex 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_decrypt_ex.
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_decrypt_ex.
Return Values
This function returns an encrypted string.
Parameterization
The argument plaintext can be parameterized.
Example
Action()
{
char* ciphertext;
char* plaintext;
ciphertext = lr_encrypt_ex("hello world!");
plaintext = lr_decrypt_ex(ciphertext);
lr_output_message("ciphertext is %s", ciphertext);
lr_output_message("plaintext is %s", plaintext);
return 0;
}

