Sign String With SHA256
  • 12 Dec 2022
  • 1 Minute to read
  • Dark
    Light

Sign String With SHA256

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version5.0.0
LocationData > Text

The Sign String With SHA256 will sign a string value using a secret key string and encoding type with SHA256 encryption



Properties

Inputs

PropertyDescriptionData Type
EncodingAllows the user to select the encoding typeStringEncodingType
Secret StringSecret string to sign the stringString
String To SignThe desired string to signString

Outputs

PropertyDescriptionData Type
OutputEncrypted SHA256 stringString

Example Inputs and Outputs

String To SignSecret StringEncodingOutput
More TextscreeUnicodeJKB1ZFahT5PGLP7lQtE5jdzzAiR6aKwYVMrCI7HOYEk=
More Text4n8si3lx8
UTF8qj0C2H6i3ru268w15mJ6GcmKYYW6DlDiaJzX/lcwixM=
More TextNullUTF32F5RQb7PeFYVC7vlOOuQoea4ZsYpGkVLorSG7aSmzZZA=
Null Value8dj3ss3s9xASCIIEXCEPTION MESSAGE


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:

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)    --

Was this article helpful?