Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

Decrypt File

Prev Next

Step Details

Introduced in Version9.18.0
Last Modified in Version--
LocationPGP

The Decrypt File step enables Users to decrypt a PGP-encrypted file.

Prerequisites 

  • This step requires the PGP module to be installed before it will be available in the toolbox. 
  • Users must download GPG before utilizing this and other PGP steps. 

Considerations

In v9.18, PGP steps were moved to a legacy category, and new steps were added. While the new PGP steps use an updated encryption/decryption approach (based on AEAD/OCB mode), both categories of steps can be utilized as they have the same functionality.  


Properties

Inputs

PropertyDescriptionData Type
FileThe desired PGP-encrypted fileFileData
Private KeyGenerated PGP private key file used for encrypting or decrypting
FileData
Private Key PasswordPassword for the specified Private KeyString

Outputs

PropertyDescriptionData Type
OutputOutputs the decrypted fileFileData

Example Inputs and Outputs

FilePrivate KeyPrivate Key PasswordOutput
file.txt3992-sec.asccatch

Id: "ac665621-ad64-4b40-b836-dd73c82b98d7",FileName: "file.txt",Length: 7,FileType: ".txt"

Nullprivate-sec.ascnewmanEXCEPTION MESSAGE
Showdetails.pdfNullstringEXCEPTION MESSAGE
flyer.docxprivate-sec.ascEmptyEXCEPTION MESSAGE


Common Errors

Object reference not set to an instance of an object

If the File input or the Password for the provided Private Key is null or empty, the step will cause an error.

To correct this, ensure that an encrypted PGP file is uploaded or mapped to the File input and that the password entered for the Private Key is correct.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Decrypt File 1[DecryptFile] in flow [Flow 2]: Exception invoking method DecryptFile on class PGPSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method DecryptFile on class PGPSteps
 ---> System.NullReferenceException: Object reference not set to an instance of an object. at Decsisions.PGP.Steps.PGPSteps.DecryptFile(Byte[] privateKey, String privateKeyPassword, FileData file)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Value cannot be null

If the Private Key is null or empty, the step will cause an error.

To correct this, ensure that the correct Private Key file is uploaded or mapped.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Decrypt File 1[DecryptFile] in flow [Flow 2]: Value cannot be null. (Parameter 'path')
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'path'
 at DecisionsFramework.Utilities.Data.DataUtilities.GetValue(IDictionary`2 data, String path, Boolean throwError, Boolean returnReferences
 at DecisionsFramework.Design.Flow.Mapping.InputImpl.SelectValueInputMapping.GetInputValue(IDataConsumer consumer, FlowStateData currentData, DecisionsType expectedType, Boolean expectingArray, String valueName, Object parentObject, Boolean canBeNull
 at DecisionsFramework.Design.Flow.FlowStep.BuildMappingData(FlowStateData data
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Step Changes

DescriptionVersionDateDeveloper Task
New steps have been added to the PGP Module. Existing steps have been added to the PGP Legacy category in the step toolbox.

9.18December 2025[DT-046254]
Related Information

Documentation:
PGP Module
Forum Posts:
Error While Encrypting A File Using PGP
PGP Issues With Decrypting Using Private Key