CreateSHA1Hash

CreateSHA1Hash

What to use it for

Prerequisites for usage

Essential properties to set

Activity to create a hash for a file or a string, using the SHA1 algorithm.

 Read more

Hashes are mostly used in security scenarios, to compare a current data value against an original data value.

Common scenarios for using a hash

  • You have a file of which you want to be able to check whether it has been tampered with. You can create a hash value from the original file and save it for reference purposes. When at a later moment you want to verify whether the file is still in its original state, you can create a new hash and compare it to the initial hash.
  • You have login functionality. Instead of saving user passwords, you can save a hash value that is based on the user's password. When the user attempts to log in, you can compare a hash of the password provided to the original hash value that you have.

Characteristics of a hash

A hash is a data value that is created by feeding data into an algorithmic function to create hashes. This function will turn the data into new data. The new data has several characteristics:

  • It has a fixed size.
  • Input data that is fairly similar will be turned in output data that is highly dissimilar.
  • It is highly unlikely to be able to retrieve the input data from the output data.

Different algorithms to create hashes

There are several algorithms to create a hash. SmartBridge supports the following: MD5, SHA-1, SHA256, SHA384, SHA512. Although it is a fast algorithm, we do not recommend using MD5.

 
  • Input
  • Path

 

You can use VB expressions (within the boundaries of the expected values), but no Workflow Macros or wildcards.

Misc

OptionsWhat is itHow to use it
Input

 

Option to indicate the string you want to hash.

Use either input or path, not both.

Enter one of the following:

  • Constant.
  • Variable, of the type string (use the variable editor at the bottom of the screen to define a variable).
  • An expression that results in a string.

Path


 

Option to indicate the string you want to hash.

Use either input or path, not both.

Enter a path, preferably an absolute path.
ResultOption to save the resulting hash to a variable, for use later in the Workflow.

Create a variable to save the result to.

 Read more
Why do I need variables

You can use variables to create a more flexible and sustainable Workflow.

Variables are mostly used in advanced Activities such as the Diversity Activities. These Activities often have two parts:

  • One part is to identify where to get data that serves as input for the Activity.
  • One part is to identify where to store data that serves as output for the Activity.

For the Diversity Activities it is common to store the data resulting from the Activity into a variable. Once stored in the variable, you can re-use the stored value elsewhere in the Workflow, by referring to the variable.

To create a variable to store data
  1. Click on the Variables button, below the Workflow. a panel will appear, containing an editable table.
  2. In the table click on 'Create variable' to start creating a new variable.
  3. Provide a name for the variable, preferably a name that describes its contents. Use camel case.
  4. Indicate the type of variable (e.g. boolean, integer, string, etc.). You can find specific types using 'Browse for types...'.
  5. Moving to another row saves this data to a new entry.

You can now use the name of this variable into one of the fields of the current Activity, or in Activities that are next.

SaltOption to use a salt that you created in a CreateSalt Activity.Provide the variable that you used in the CreateSalt Activity to save the salt to.
Display name Name of the Activity.Leave at default, or edit the name to reflect to what the hash applies.

Other cryptography Activities