Compute Hash

A hash function is used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values .A hash function takes an input as a key, which is associated with a data or record and used to identify it to the data storage and retrieval application. Hashing converts variable length keys into fixed length values, by folding them by words or other units.

Sheetkraft has its own .sk function – ComputeHash.sk which creates hash from an input using a specified hash algorithm.

This function is essentially used for encryption of password. Whenever we try to login to a private website, a plain text password gets converted to hash using standard algorithms and is finally sent to the server.

How to use the function ComputeHash.SK?

Suppose you want to create hash for a specific input. (See figure below)

Step 1: In your preferred cell (where you want the hash value to be generated) type

=ComputeHash.SK( ” and press the Function(fx) button . The following dialogue box opens up.

Step 2: In the section Value, browse and choose the cell which contains your input. (Cell B2 in this case)

Step 3: In the section Algorithm, input the type of algorithm that would be used to hash.

(Some of the different types of algorithms are SHA1, MD5, SHA256, SHA384, SHA512)

Step 4: In the section Input Type, you need to need enter input format type. Generally it defaults to text. (Other types of Input supported are – Base64, Hex.)

Step 5: In the section Output Type, you need to enter output format type. Generally it defaults to Base64. (Other types of Output supported are – Hex.)

Following the above steps the dialogue box should look like the following. (See figure below)

Step 6: Clicking on OK generates our output, i.e. our hash.

Note:

  • Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ASCII. This is to ensure that the data remain intact without modification during transport

  • Base16 or hex, the hexadecimal numbering system uses combinations of 16 character digits to represent numbers. Hexadecimal uses all ten numbers in the decimal system (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) and letters A through F.

  • The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value.

  • SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function which takes an input and produces a 160-bit (20-byte) hash value known as a message digest – typically rendered as a hexadecimal number, 40 digits long.

  • SHA-256 is one of the successor hash functions to SHA-1.