--- title: "Sign String With SHA" slug: "sign-string-with-sha256" tags: ["string", "SHA 256"] updated: 2022-12-12T14:54:09Z published: 2022-12-12T14:54:09Z canonical: "documentation.decisions.com/sign-string-with-sha256" --- > ## 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 String With SHA256 | ## Step Details | | --- | | **Introduced in Version** | 4.0.0 | | **Last Modified in Version** | 5.0.0 | | **Location** | Data > Text | The **Sign String With SHA256** will sign a string value using a secret key string and encoding type with SHA256 encryption --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Encoding | Allows the user to select the encoding type | StringEncodingType | | Secret String | Secret string to sign the string | String | | String To Sign | The desired string to sign | String | #### Outputs | Property | Description | Data Type | | --- | --- | --- | | Output | Encrypted SHA256 string | String | --- ## Example Inputs and Outputs | String To Sign | Secret String | Encoding | Output | | --- | --- | --- | --- | | More Text | scree | Unicode | JKB1ZFahT5PGLP7lQtE5jdzzAiR6aKwYVMrCI7HOYEk= | | More Text | 4n8si3lx8 | UTF8 | qj0C2H6i3ru268w15mJ6GcmKYYW6DlDiaJzX/lcwixM= | | More Text | Null | UTF32 | F5RQb7PeFYVC7vlOOuQoea4ZsYpGkVLorSG7aSmzZZA= | | Null Value | 8dj3ss3s9x | ASCII | EXCEPTION MESSAGE | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2022-12-08_11h03_05.png) --- ## Common Errors ### String reference not set to an instance of a String If the String to Sign is null, an error will occur. To correct this, ensure that the value in String to Sign is not null. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Sign String With SHA 256 1[SignStringWithSHA256] in flow [Flow 2]: Exception invoking method SignStringWithSHA256 on class StringEncryption ---> DecisionsFramework.LoggedException: Exception invoking method SignStringWithSHA256 on class StringEncryption ---> System.ArgumentNullException: String reference not set to an instance of a String. (Parameter 's') at System.Text.Encoding.GetBytes(String s) at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringEncryption.SignStringWithSHA256(String stringToSign, String secretString, StringEncodingType encoding) --- 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) -- ``` ## Related - [Get HMAC-SHA256 Hash Step](/get-hmac-sha256-hash-step.md) - [Get HMAC-SHA384 Hash](/get-hmac-sha384-hash.md) - [Hash String With SHA 256](/hash-string-with-sha-256.md) - [Send Documents For Signing](/send-documents-for-signing.md)