---
title: Hash functions
slug: hash-functions
docTags: 
createdAt: 2026-02-24T10:04:12.658Z
---

Hash functions take variable-length inputs and produce fixed-length outputs of text that can't be reversed or decoded. The resulting output can only be compared. Hashing is used for integrity verification.

For example, a typical business use of hash functions is for the secure storage of user passwords.

When a user sets or changes a password, the system does not store the original password. Instead, it stores a hash value and a salt in the database.&#x20;

First, a unique string (salt), is added to the user's password. Salting the password ensures that, even if two users have the same password, the password hash values will be different.

Next, the salt and password are hashed and the password hash value and unique salt are stored in the database. The original password is not saved.

When the user attempts to log in, the system retrieves the stored salt and password hash, calculates a new hash, and compares the new hash to the stored password hash. This method protects users if the database is breached.

The following hash functions can be used in Make:

| **Function** | **Description**                                                                                                                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **sha1**     | The [sha1 function](https://help.make.com/text-and-binary-functions#sha1) has an output size of 160 bits. Though faster<br />than the `sha256` and `sha512` functions, it is not as secure.<br />It is generally not recommended for use.                                            |
| **sha256**   | The [sha256 function](https://help.make.com/text-and-binary-functions#sha256) has an output size of 256 bits. It is secure<br />to use for data integrity and performs quickly on 32-bit systems.<br />SHA-256 is a widely accepted standard that is used often.                     |
| **sha512**   | The [sha512 function](https://help.make.com/text-and-binary-functions#sha512) has an output size of 512 bits. SHA-512 is<br />used for the highest level of security or when 64-bit is required.                                                                                     |
| **md5**      | The [md5 function](https://help.make.com/text-and-binary-functions#md5) has an output size of 128 bits. It's most<br />commonly used to validate that a file has been downloaded<br />correctly without any missing or corrupted data. It is not<br />recommended for use otherwise. |

You can find hash functions under the **Text and binary functions** tab:

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/geWxluUSvhj2Mq6pAUL1Y-20260122-093600.png" size="38" width="383" height="368" position="flex-start" showCaption="false"}

::::ExpandableHeading
## Example: Compare hash values

In this example we will:

1. Select content to hash.
2. Set variables with a variety of sha functions.
3. Compare hash values.

**Step 1: Select content to hash**

In this example, we set a variable `InitialText` with our content to be hashed.

In your scenario, you may have the content set another way or pulled from a different source.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/9wX8upJMbxY8yqAmPXHk--20260209-123012.png" size="60" width="724" height="555" position="flex-start" showCaption="false"}

**Step 2: Set variables with a variety of sha functions**

The most common hash functions are `sha256` and `sha512`.&#x20;

Here we set three variables with the **Set multiple variables** module using the original content `InitialText`:

- `hash-sha256`,&#x20;
- `hash-sha512`, and&#x20;
- `hash-sha512++`, a hash with a salt added.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/GfsOx001Ny_7INBzqFLVe-20260210-100733.png" size="40" width="425" height="195" position="flex-start" showCaption="false"}

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/B5HSQMbYk5RK2JF8-2FDP-20260210-101248.png" size="40" width="425" height="186" position="flex-start" showCaption="false"}

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/7Sa_0eAM514qhVIEwMXTz-20260210-101315.png" size="40" width="425" height="205" position="flex-start" showCaption="false"}

:::hint{type="info"}
Sha functions allow you to add extra parameters, and in the case of `hash-sha512++`, we set the value to hexadecimal and added more information as a salt for additional security.
:::

The output of these variables are hash values of the original content `InitialText`.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/Ky9-Pv3lST1m0sCxyQwnq-20260217-130310.png" size="40" width="399" height="152" position="flex-start" showCaption="false"}



**Step 3: Compare hash values**

A hash is often stored and then compared later with a new hash. For example, if you set a password for an account, the hash is stored. Then, when you log in again, the hash of your new input (your password) is compared to the stored hash. If the hash values match, you are logged in to your account. If the hash values differ, you are denied access.

Here, the new input is received, set as variables and hashed, and the new hash values are compared in the filters set after the router.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/lsWALVnw_U8ZyHu_7ifYH-20260210-102827.png" size="80" width="1067" height="698" position="flex-start" showCaption="false"}

If the results do not match, the result is an error. In the password example described above, a user would not be allowed to log in.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/UCETuPeENMP-GuozWjSQ_-20260210-103537.png" size="40" width="431" height="168" position="flex-start" showCaption="false"}

If the results match, there is no error. In the password example described above, a user would be allowed to log in.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/pRxXIGzVH8ckzZDj9BXvU-20260210-103733.png" size="40" width="459" height="245" position="flex-start" showCaption="false"}
::::

