Modifier Blocks
Hash Block
Calculate MD5 or SHA hash of input data for equivalency comparisons
Overview
The Hash Block calculates the MD5 or SHA hash of incoming data. This block is particularly useful for performing equivalency comparisons, data integrity checks, or generating unique identifiers based on content.
Key Features
- Support for multiple hash algorithms (MD5, SHA-1, SHA-256, SHA-512)
- Converts input to string before hashing
- Outputs hash value as a string
Inputs
The data to be hashed. Required. Non-string inputs will be coerced to strings.
Outputs
The calculated hash value of the input data.
Editor Settings
The hash algorithm to use. Options:
md5
: MD5 algorithmsha1
: SHA-1 algorithmsha256
: SHA-256 algorithmsha512
: SHA-512 algorithm
Example: Generating a Hash for Data Comparison
- Create a Text Block with some sample data, e.g., “Hello, World!”.
- Add a Hash Block and connect the Text Block’s output to its
input
. - Configure the Hash Block to use SHA-256 algorithm.
- Run the flow to see the generated hash value.
Error Handling
- If the input is undefined or null, the block will error
- Invalid algorithm selections will result in an error