Skip to main content

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

NameDescription
Input
AlgorithmSpecifies the decryption algorithm to use. The drop-down menu provides options such as AES, TripleDES, DES, AESGCM, RC2, and Rijndael.
File PathSpecifies the full path of the file to decrypt. String variables containing the file path.
KeySpecifies the key to use for decrypting the specified file. String variables containing the decryption key.
Misc
Display NameProvides 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
DelaySpecifies 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 PathSpecifies 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:

  1. Drag and drop the "Decrypt File" activity onto the workflow.
  2. Select the decryption algorithm from the dropdown list (AES, TripleDES, DES, AESGCM, RC2, or Rijndael).
  3. Configure the properties by specifying the decryption key, file path, and output path.
  4. Optionally, configure the delay and customize the display name.
  5. 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:

  1. AES (Advanced Encryption Standard)
  2. TripleDES (Triple Data Encryption Standard)
  3. DES (Data Encryption Standard)
  4. AESGCM (AES Galois/Counter Mode)
  5. RC2 (Rivest Cipher 2)
  6. 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.