--- title: "Sign File" slug: "sign-file-1" updated: 2025-12-08T20:23:03Z published: 2025-12-08T20:23:03Z canonical: "documentation.decisions.com/sign-file-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Sign File | ## Step Details | | --- | | **Introduced in Version** | 9.18.0 | | **Last Modified in Version** | -- | | **Location** | PGP | --- The **Sign File** step uses a PGP Private Key and Private Key Password to sign a file. The [Decrypt File](/step-library/docs/decrypt-file) or [Decrypt and Verify File](/step-library/docs/decrypt-and-verify-file) step is needed to decrypt the file to be read. ## Upgrading to v8.13+ Customers using the Sign File, Clear Sign File, or Sign And Encrypt File steps need to drag and drop these steps after upgrade into the Flows using them. Steps that are already in Flows may have their mapping set to Null on upgrade. ### Prerequisites - This step requires the [PGP module](https://documentation.decisions.com/docs/pgp-module-overview#overview) to be [installed](https://documentation.decisions.com/docs/installing-modules-decisions) before it will be available in the toolbox. - Users must download [GPG](https://www.gnupg.org/download/) 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 | Property | Description | Data Type | | --- | --- | --- | | Algorithm | Allows the user to select a [Hash Algorithm](https://en.wikipedia.org/wiki/List_of_hash_functions#) type (MD5, Sha1, RipeMD160, DoubleSha, MD2, Tiger192, Havel5pass160, Sha256, Sha384, Sha512, Sha224). To see the dropdown list, select Constant mapping. | HashAlgorithmTag | | Binary | Defines whether the output file is encrypted as bytes or raw text/ascii | Boolean | | Data | The desired file to sign | List of Byte | | Internal File Label | Specifies the name of the internal file of the signed and encrypted file | String | | Output File Name | Allows the user to specify the file name and file extension for the signed file (i.e., SignednewFile.pdf) | String | | Private Key | Generated PGP Private Key file | List of Byte | | Private Key Password | Password for the specified Private Key file | String | #### Outputs | Property | Description | Data Type | | --- | --- | --- | | Output | Outputs a digitally signed file | FileData | --- ## Example Inputs and Outputs | Algorithm | Binary | Data | Internal File Label | Output File Name | Private Key | Private Key Password | Output | | --- | --- | --- | --- | --- | --- | --- | --- | | MD5 | True | upcomingShow.pdf | Null | signedShow.pdf | priv-sec.asc | catch | Id: "8680b789-368b-4ad0-a618-2e3ce82be969",FileName: "signedShow.pdf",Length: 1409,FileType: ".pdf" | | Sha1 | False | Null | Local | signedNew.docx | new-sec.asc | catch | EXCEPTION MESSAGE | | Null | False | example.txt | Internal Label | docsigned.txt | priv-sec.asc | catch | EXCEPTION MESSAGE | | MD2 | Empty | sample.pdf | Sample | sampleSign.pdf | new-priv-sec.asc | catch | EXCEPTION MESSAGE | | Sha256 | False | newText.txt | Null | signedFile.txt | priv-sec.asc | catch | Id: "c7abef89-7ae6-45a0-a4e5-2ed2df3657da",FileName: "signatureFile.txt",Length: 399,FileType: ".txt" | | Tiger192 | False | sample.ppx | Sample | Empty | new-priv-sec.asc | catch | EXCEPTION MESSAGE | | Sha256 | False | example.docx | Example | upSigned.docx | Null | catch | EXCEPTION MESSAGE | | Sha512 | True | example.txt | Internal | signedFile | priv-sec.asc | catch | Id: "a6b874dd-2073-4b7d-a63c-395f4b17b716",FileName: "signedFile",Length: 395,FileType: "" | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1675350933527.png) --- ## Common Errors ### Buffer cannot be null If the Data field is empty or null, the step will cause an error. To correct this, ensure that a file is mapped or uploaded as a value for the Data field. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Sign File 1[SignFile] in flow [Flow 2]: Exception invoking method SignFile on class PGPSteps ---> DecisionsFramework.LoggedException: Exception invoking method SignFile on class PGPSteps ---> System.ArgumentNullException: Buffer cannot be null. (Parameter 'buffer' at System.IO.MemoryStream..ctor(Byte[] buffer at Decsisions.PGP.Steps.PGPSteps.SignFile(String internalFileLabel, Byte[] privateKey, String privateKeyPassword, Byte[] data, Boolean binary, HashAlgorithmTag algorithm, String outputFileName) --- 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 --- ``` --- ### Parameter 'binary' of 'SignFile' can not be null If the Binary field is null or empty, the step will cause an error. To correct this, set the input mapping for the Binary field to Constant. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.BusinessRuleException: [BusinessRule] Parameter 'binary' of 'SignFile' can not be null at DecisionsFramework.Design.Flow.CoreSteps.InvokeMethodUtility.ThrowErrorIfNullIsNotAllowed(MethodInfo methodInfo, Object[] parameterValues, String errorMessage 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) ``` --- ### Object reference not set to an instance of an object If the Output File Name or Private Key Password is null or empty, the step will cause an error. To correct this, ensure that a value is entered or mapped to the field. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Sign File 1[SignFile] in flow [Flow 2]: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DecisionsFramework.Data.DataTypes.FileData.ProcessValueAddedToFlowData(String filePath, Boolean isFilePathFromSearch at DecisionsFramework.Data.DataTypes.FileData.ValueAdded( at DecisionsFramework.Design.Flow.Mapping.KeyValueDictionary.Add(KeyValuePairDataStructure item 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 --- ``` --- ## Step Changes | Description | Version | Date | Developer 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.18](https://documentation.decisions.com/v99/docs/en/2ebf7a4c-e925-4e8f-9fd4-ff94a14910cc?isPreview=true&versionNumber=1) | December 2025 | [DT-046254] | Related Information Documentation: [PGP Module](https://documentation.decisions.com/docs/pgp) Forum Posts: [Email Encrypt / Decrypt With PGP Module](https://support.decisions.com/forum/topic1520-email-encrypt--decrypt-with-pgp-module.aspx) [Error While Encrypting A File Using PGP](https://support.decisions.com/forum/topic1814-error-while-encrypting-a-file-using-pgp.aspx) [PGP Issues With Decrypting Using Private Key](https://support.decisions.com/forum/topic2522-pgp-issues-with-decrypting-using-private-key.aspx)