Help Centre › Functions & Formulas
This article describes the RPA Crypto functionality to encrypt a file.
For a full list of available functions, please read CRYPTO functions.
Description
The Encrypt file function encrypts a file using a Fernet key. The encrypted output is written to a new file, leaving the original file unchanged.
Setting it up
To use the Encrypt file function, follow these instructions:
{{popups:rpas/add:action=crypto-encrypt-file}}
Once on a process map:
- Navigate to the process where you would like to add the Encrypt 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 Encrypt file option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File Path | Yes | Text | - | The path to the file to encrypt |
| Key | Yes | Text | - | The Fernet encryption key |
| Output Path | No | Text | file_path + .enc | The path for the encrypted output file |
| Variable | No | Text | encrypted_file | Variable name to store the output file path |
Output variables
| Variable | Type | Description |
|---|---|---|
| {encrypted_file} | String | The path to the encrypted output file |
Errors
| Error | Description |
|---|---|
| File not found | The source file does not exist |
| Invalid key | The provided key is not a valid Fernet key |
Tips
- The original file is not modified or deleted
- Default output appends .enc to the original filename