Help Centre › Functions & Formulas
This article describes the RPA Crypto functionality to decrypt a file.
For a full list of available functions, please read CRYPTO functions.
Description
The Decrypt file function decrypts an encrypted file using a Fernet key. The decrypted output is written to a new file.
Setting it up
To use the Decrypt file function, follow these instructions:
{{popups:rpas/add:action=crypto-decrypt-file}}
Once on a process map:
- Navigate to the process where you would like to add the Decrypt file 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 file option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File Path | Yes | Text | - | The path to the encrypted file to decrypt |
| Key | Yes | Text | - | The Fernet key used for encryption |
| Output Path | No | Text | - | The path for the decrypted output file. Defaults to removing the .enc extension. |
| Variable | No | Text | decrypted_file | Variable name to store the output file path |
Output variables
| Variable | Type | Description |
|---|---|---|
| {decrypted_file} | String | The path to the decrypted output file |
Errors
| Error | Description |
|---|---|
| File not found | The encrypted file does not exist |
| Invalid key | The provided key is not a valid Fernet key |
| Invalid file | The file is not a valid Fernet-encrypted file |
Tips
- The default output path removes the .enc extension from the input filename
- You must use the same key that was used for encryption