Decrypt and Verify File
  • 11 Dec 2024
  • 1 Minute to read
  • Dark
    Light

Decrypt and Verify File

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version8.1.0
LocationPGP Steps

The Decrypt and Verify File step allows a user to decrypt a PGP file that has been digitally signed. 

Prerequisites 

This step requires the PGP module to be installed before it will be available in the toolbox. 


Properties

Inputs

PropertyDescriptionData Type
FileThe desired signed file to decrypt. Using an encrypted PGP file will not throw an error but will not decrypt the file.FileData
Private KeyGenerated PGP Private Key file
List of Byte
Private Key PasswordPassword for the specified Private Key file
String
Public KeyGenerated Public Key file
List of Byte

Outputs

PropertyDescriptionData Type
OutputOutputs the decrypted fileFileData

Example Inputs and Outputs

FilePrivate KeyPrivate Key PasswordPublic KeyOutput
NewsignedFile.txtp-sec.ascflexopen-pub.asc

Id: "99cd43fb-129f-4723-840b-feea020760f8",FileName: "NewsignedFile.txt",Length: 7,FileType: ".txt"

encrypted_sample.pdfp-sec.ascflexopen-pub.asc
data: {}
Nullp-sec.ascflexopen-pub.asc
EXCEPTION MESSAGE
example.txtEmptyflexopen-pub.asc
EXCEPTION MESSAGE
example.txtp-sec.ascNullopen-pub.asc

Id: "8957e8ad-f8c3-478e-9c08-446592f67890",FileName: "example.txt",Length: 327,FileType: ".txt"

sample.pdfp-sec.ascflexNullEXCEPTION MESSAGE


Common Errors

Object reference not set to an instance of an object

If the Data field is null or empty, the step will cause an error.

To correct this, ensure that a signed PGP file is uploaded or mapped to the field.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Decrypt And Verify File 1[DecryptAndVerifyFile] in flow [Flow 2]: Exception invoking method DecryptAndVerifyFile on class PGPSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method DecryptAndVerifyFile on class PGPSteps
 ---> System.NullReferenceException: Object reference not set to an instance of an object. 
at Decsisions.PGP.Steps.PGPSteps.DecryptAndVerifyFile(Byte[] privateKey, String privateKeyPassword, Byte[] publicKey, 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 ---

Buffer cannot be null. 

If the Public Key or Private Key fields are null or empty, the step will cause an error.

To correct this, ensure that the appropriate file is uploaded or mapped to the Public Key and Private Key fields.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Decrypt And Verify File 1[DecryptAndVerifyFile] in flow [Flow 2]: Exception invoking method DecryptAndVerifyFile on class PGPSteps 
 ---> DecisionsFramework.LoggedException: Exception invoking method DecryptAndVerifyFile on class PGPSteps 
 ---> System.ArgumentNullException: Buffer cannot be null. 
(Parameter 'buffer'  at System.IO.MemoryStream..ctor(Byte[] buffer  at Decsisions.PGP.Steps.PGPSteps.DecryptAndVerifyFile(Byte[] privateKey, String privateKeyPassword, Byte[] publicKey, 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 ---

Related Information

Documentation:
PGP Module

Forum Posts:
Email Encrypt / Decrypt With PGP Module
Error While Encrypting A File Using PGP
PGP Issues With Decrypting Using Private Key


Was this article helpful?

What's Next