# CryptoHash

## Overview

![The CryptoHash Node.](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-1e531671edffa9352f626583408209965db25077%2Fcryptohashupdatedimage.png?alt=media)

The **CryptoHash** **Node** takes a **String** and encrypts it as a *hash* using an algorithm chosen by the user.

[**Scope**](https://docs.incari.com/incari-studio/2023.1/overview#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The CryptoHash Node Attributes.](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-a63689970570691e323c7cce38dc5ea2219ad59b%2Fcryptohashattributes.png?alt=media)

| Attribute   | Type          | Description                                                                                                                                            |
| ----------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `String`    | **String**    | The **String** that will be encrypted, if none is given in the **Input Socket**.                                                                       |
| `Algorithm` | **Drop-down** | The algorithm that will be used for the encryption, if none is given in the **Input Socket**. The available options are `MD5`, `SHA-1`, and `SHA-256`. |

## Inputs

| Input             | Type       | Description                                                                                                                  |
| ----------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**  | A standard **Input Pulse**, to trigger the execution of the **Node**.                                                        |
| `String`          | **String** | The **String** that will be encrypted.                                                                                       |
| `Algorithm`       | **String** | The algorithm that will be used for the encryption. It should be one of the available options: `MD5`, `SHA-1`, or `SHA-256`. |

## Outputs

| Output             | Type       | Description                                                                                                                            |
| ------------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse**  | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Hash`             | **String** | The *hash value* corresponding to the **String** given as input.                                                                       |

## External Links

* [*Cryptographic hash function*](https://en.wikipedia.org/wiki/Cryptographic_hash_function) on Wikipedia.
* [*MD5*](https://en.wikipedia.org/wiki/MD5) on Wikipedia.
* [*SHA-1*](https://en.wikipedia.org/wiki/SHA-1) on Wikipedia.
* [*SHA-2*](https://en.wikipedia.org/wiki/SHA-2) on Wikipedia.
