Crypto
Common cryptographic and encoding helpers: hash a value, sign it with an HMAC (for example to call or verify a webhook), generate a UUID or a random token, and Base64 encode or decode.
Parameters
Which fields appear depends on the Operation.
| Name | Shown for | Default | Description |
|---|---|---|---|
Operation (operation) | all | Hash | hash, hmac, uuid, random, base64Encode, base64Decode. Required. |
Value (value) | hash, hmac, Base64 encode/decode | — | The input. Text is used as UTF-8; an in-memory file (e.g. from an HTTP response or upload) is hashed/encoded as its bytes. |
Algorithm (algorithm) | hash, hmac | SHA-256 | sha256, sha384, sha512, sha1 (legacy), md5 (legacy). |
Secret (secret) | hmac | — | The signing key, ideally from a secret: {{ $secrets['signing-key'] }}. Required for HMAC. |
Output encoding (encoding) | hash, hmac | Hex | hex (lower-case) or base64. |
Version (uuidVersion) | uuid | v4 | v4 (random) or v7 (time-ordered, sorts by creation time). |
Characters (randomType) | random | Letters and digits | alphanumeric, hex, numeric (digits), base64. |
Length (length) | random | 32 | Number of characters, 1–4096. |
Ports
| Port | Description |
|---|---|
main (input) | The step(s) Crypto runs after. |
output | { result } — always a string. |
Output
{ "result": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" }
(SHA-256 of hello world, hex.)
Example
Sign an outgoing webhook so the receiver can verify it:
- Crypto
- Operation: HMAC
- Value:
{{ $nodes['Build Payload'].result }}(a Code step that returns the JSON payload as a string) - Algorithm: SHA-256
- Secret:
{{ $secrets['webhook-signing-key'] }} - Output encoding: Hex
- HTTP Request with header
X-Signature: sha256={{ $nodes['Crypto'].result }}and the same payload as the body.
To verify an incoming signature instead, compute the HMAC of the raw body the same way and compare it with the header in an If / Else.
Notes
- Random strings and UUIDs use a cryptographically secure generator.
- Base64 decode accepts standard and URL-safe Base64, with or without
=padding, and returns the decoded bytes as UTF-8 text. - Hash and HMAC accept stored files (large files kept in storage) as Value and read them in chunks, so any size works. Base64 encode needs the content loaded first (the File step loads up to 25 MB).
- MD5 and SHA-1 are offered for compatibility with older systems only — don't use them for security.
- Keep keys in Secrets rather than typing them into the step.