Crypto
Perform cryptographic operations including hashing, HMAC signing, UUID generation, random bytes, and Base64 encoding.
The Crypto node performs common cryptographic and encoding operations within a workflow. Use it to hash data, sign payloads with HMAC, generate UUIDs, create random bytes, or encode and decode Base64 strings.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Operation | Select | Yes | The cryptographic operation to perform. |
Operations and Their Fields
Hash -- Compute a cryptographic hash of the input data.
| Field | Type | Required | Description |
|---|---|---|---|
| Algorithm | Select | No | Hash algorithm: SHA-256, SHA-512, SHA-1, or MD5. Defaults to SHA-256. |
| Input | Text (variable) | Yes | The data to hash. |
| Output Encoding | Select | No | Encoding for the result: Hex or Base64. Defaults to Hex. |
HMAC -- Compute a keyed-hash message authentication code.
| Field | Type | Required | Description |
|---|---|---|---|
| Algorithm | Select | No | Hash algorithm: SHA-256, SHA-512, SHA-1, or MD5. Defaults to SHA-256. |
| Input | Text (variable) | Yes | The data to sign. |
| Secret Key | Text (variable) | Yes | The HMAC secret key. |
| Output Encoding | Select | No | Encoding for the result: Hex or Base64. Defaults to Hex. |
Generate UUID -- Generates a cryptographically random UUID v4. No additional fields.
Random Bytes -- Generates cryptographically secure random bytes.
| Field | Type | Required | Description |
|---|---|---|---|
| Byte Length | Number | No | Number of random bytes to generate (1-1024). Defaults to 32. |
| Output Encoding | Select | No | Encoding for the result: Hex or Base64. Defaults to Hex. |
Base64 Encode -- Encodes input text to Base64.
| Field | Type | Required | Description |
|---|---|---|---|
| Input | Text (variable) | Yes | The text to encode. |
Base64 Decode -- Decodes a Base64 string back to UTF-8 text.
| Field | Type | Required | Description |
|---|---|---|---|
| Input | Text (variable) | Yes | The Base64 string to decode. |
Output
| Field | Type | Description |
|---|---|---|
| result | string | The operation result: hash digest, HMAC signature, UUID string, random bytes, or encoded/decoded text. |
| algorithm | string | The hash algorithm used (Hash and HMAC operations only). |
| encoding | string | The output encoding used (Hash, HMAC, and Random Bytes operations only). |
| byteLength | number | The number of random bytes generated (Random Bytes operation only). |
Example
A workflow that verifies an incoming webhook signature using HMAC:
- Webhook Listener -- Receives a POST request with a payload and an
X-Signatureheader. - Crypto -- Operation: HMAC, Algorithm: SHA-256, Input:
webhookTrigger_1.body, Key: stored secret, Encoding: Hex. - If/Else -- Check
crypto_1.resultequalswebhookTrigger_1.headers.x-signature. - HTTP Request (true branch) -- Process the verified payload.
- Stop and Error (false branch) -- Reject the request with "Invalid signature."