Decrypt File
AutomatR.DefaultActivities.Cryptography.DecryptFile
The "Decrypt File" activity in AutomatR is part of the Cryptography activities package, enabling users to decrypt a file using a specified key encoding and algorithm. This activity supports various decryption algorithms, including AES, TripleDES, DES, AESGCM, RC2, and Rijndael.
Properties
Name | Description |
---|---|
Input | |
Algorithm | Specifies the decryption algorithm to use. The drop-down menu provides options such as AES, TripleDES, DES, AESGCM, RC2, and Rijndael. |
File Path | Specifies the full path of the file to decrypt. String variables containing the file path. |
Key | Specifies the key to use for decrypting the specified file. String variables containing the decryption key. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies a delay (in seconds) before executing the activity, providing flexibility in the timing of the workflow. Supports an Int32 variable. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1. |
Output | |
Output Path | Specifies the path where the decrypted file will be saved. It supports a string variable, allowing you to define the destination path dynamically. |
Example
Decrypt File:
Algorithm: "AES"
Key: "myEncryptionKey"
File Path: "C:\EncryptedFiles\encrypted.txt"
Output Path: "C:\DecryptedFiles\decrypted.txt"
Delay: 5
How to use:
- Drag and drop the "Decrypt File" activity onto the workflow.
- Select the decryption algorithm from the dropdown list (AES, TripleDES, DES, AESGCM, RC2, or Rijndael).
- Configure the properties by specifying the decryption key, file path, and output path.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to decrypt the specified file.
Note:
- The activity supports various decryption algorithms, and the specific algorithm is chosen based on the selected option in the "Algorithm" property.
- The decrypted file is saved to the specified output path.
Exception Handling:
- The activity handles cryptographic exceptions and other potential errors that might occur during the decryption process.
- If an error occurs, the activity outputs relevant information to aid in troubleshooting.
Supported Algorithms:
- AES (Advanced Encryption Standard)
- TripleDES (Triple Data Encryption Standard)
- DES (Data Encryption Standard)
- AESGCM (AES Galois/Counter Mode)
- RC2 (Rivest Cipher 2)
- Rijndael
Example: Consider an example where the "Decrypt File" activity is used to decrypt an AES-encrypted file named "encrypted.txt" and save the decrypted content to "decrypted.txt":
Decrypt File:
Algorithm: "AES"
Key: "myEncryptionKey"
File Path: "C:\EncryptedFiles\encrypted.txt"
Output Path: "C:\DecryptedFiles\decrypted.txt"
Delay: 5
In this example, the activity decrypts the specified file using the AES algorithm and saves the decrypted content to the specified output path.