DecryptFile

Estimated reading: 4 minutes 1730 views

This activity helps users decrypt encrypted files by using the exact key encoding and encryption algorithm that were used during the encryption process.

Properties

INPUT

Algorithm: This parameter indicates to choose the algorithm type from the drop-down menu that is used to decrypt the file text based on it.

1. AES(Deprecated)
2. AES GCM
3. DES (Deprecated)
4. RC2 (Non-FIPS) (Deprecated)
5. Rijndael (Non-FIPS) (Dperecated)
6. Triple DES.

Refer to the documentation below to view the types of algorithms.
By default, the activity recommends the most commonly used type, “AES GCM”.

DelayAfter: It assists the user to add a delay before initiating subsequent activities. The delay duration here is in milliseconds. By default, it is set to “1000” milliseconds.
When the option is left blank, the delay will not be considered.

DelayBefore: It assists the user in adding a delay before starting the execution of the activities. The delay duration here is in milliseconds. By default, it is set to “1000” milliseconds.
When the option is left blank, the delay will not be considered.

Input File Path*: This parameter indicates to provide the input path of the file which needs to be decrypted.

This parameter accepts the values in “String” datatype. You can either hardcode the values in “String” format or can provide the variable in “String” datatype.

Key Encoding: It assists the user to choose the key encoding type from the drop-down menu that is used to perform the encryption algorithm.

Click here to refer the documentation to view the types of key encoding.

By default, the activity recommends the most commonly used type, “Unicode UTF-8”.

Overwrite: Check this box if you want to overwrite a file if the specified output file path is already in use.

By default, it is unchecked.

Secret Key*: This parameter indicates to provide the key which is used by algorithm chosen to encrypt as well as decrypt the file.

This field accepts values in “String” datatype. You can either hardcode the values in “String” format or can provide the variable in “String” datatype.

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”

True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It indicates the version of the feature being used.

OUTPUT

Output File PathIt assists the user to provide the file path where the decrypted file needs to be saved in the system. 

This field returns values in “String” datatype. You can either hardcode the values in “String” format or can provide the variable in “String” datatype.

Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”

True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Represents mandatory fields to execute the workflow.

Let’s see how this activity operates:

In this example, we will decrypt a file using the “Decrypt File” activity. The input file for decryption is the same file that was previously encrypted using the “Encrypt File” activity. Click here to learn more about how encryption works.

1. Create a new workflow or open an existing workflow.
2. Drag and drop the “DecryptFile” activity into the workflow and set it as the start node.
a. Double-click on the activity to provide the details.
b. Proceed with the default algorithm type (AES GCM).
c. Navigate to the “Input File Path” in the properties section to provide the input file path. Use the file that has been previously encrypted as the input.
d. Next, go to the “Secret Key” field and provide the same key that was used in the “Encrypt File” activity as the input to decrypt the file. Use “ABC123456789FILE” as the key.
3. Keep the other options at their default values.
4. Now, navigate to the “Output File Path” in the output section of the properties to specify where to save the decrypted file.
a. Enter the directory path as
`Environment.GetFolderPath(Environment.SpecialFolder.Desktop)`.
b. This syntax fetches the username and desktop folder path to save the decrypted file.
5. Now, save the workflow and execute it.

Share this Doc

DecryptFile

Or copy link

CONTENTS