Help Centre › Functions & Formulas
This article describes the RPA Crypto functionality to decrypt text.
For a full list of available functions, please read CRYPTO functions.
Description
The Decrypt text function decrypts a Fernet-encrypted token back to its original text. You must use the same key that was used for encryption.
Setting it up
To use the Decrypt text function, follow these instructions:
{{popups:rpas/add:action=crypto-decrypt}}
Once on a process map:
- Navigate to the process where you would like to add the Decrypt text function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the CRYPTO Decrypt text option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Token | Yes | Text | - | The encrypted Fernet token to decrypt |
| Key | Yes | Text | - | The Fernet key used for encryption |
| Variable | No | Text | decrypted | Variable name to store the decrypted text |
Output variables
| Variable | Type | Description |
|---|---|---|
| {decrypted} | String | The decrypted original text |
Errors
| Error | Description |
|---|---|
| Invalid key | The provided key is not a valid Fernet key |
| Invalid token | The token is not a valid Fernet token |
| Token expired | The token has expired (if TTL was set during encryption) |
Tips
- You must use the same key that was used for encryption
- If decryption fails, verify the key matches the one used during encryption