SHA-1 Hashing
The broken hash that's still perfect for puzzles
- key
- hash_bytes
Let's get the disclaimer out of the way: SHA-1 is cryptographically broken. Collision attacks have been practical since 2017 (the SHAttered paper), and no one sane uses it for anything security-critical anymore. So why does the ARG Toolkit ship it? Because ARGs aren't usually about defending against attackers - they're about puzzles, and SHA-1 remains one of the most recognizable hash formats on the internet. It's what a puzzle-maker writes when they want a checksum that a solver can verify in ten different tools, or when they're hiding the output of a well-known hash chain. For that job, SHA-1 is fine.
This node is a thin wrapper: feed it bytes, get a 20-byte SHA-1 digest back.
How it works
The SHA1 node takes a single required input, key1 (BYTESLIKE - the "key" naming is inherited from the pack's shared hashing base, it's really just your input data), and returns hash_bytes, a 20-byte BYTESLIKE digest. There are no algorithm choices because SHA-1 is one algorithm. It's built on the cryptography library, so you're getting the real thing, not a toy implementation.
The node lives in the pack's "Modern/Hashing" category, which is a slight fib given that SHA-1 is 30 years old, but the category is really "not a classical pencil-and-paper cipher."
What you'll actually do with it
- Verify that a downloaded file in your ARG matches a published SHA-1 checksum.
- Take a known hash value from a puzzle and have the node compute the same input's digest to compare.
- Chain it: hash a string, convert the digest to hex with
String2Hex, and that hex string is what goes into the puzzle.
Because everything in this pack is bytes-first, expect to pair SHA1 with a string-to-bytes converter on the way in and String2Hex (or the Base64 converter) on the way out if you need something human-readable.
Installing it
Part of ComfyUI ARG Toolkit - ComfyUI Manager (search "ComfyUI ARG Toolkit") or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Restart ComfyUI. Dependencies (cryptography among them) are handled by Manager; no model downloads.
Common issues
- Bytes errors - plain text isn't accepted; run it through a string-to-bytes node first.
- Wrong-length output - SHA-1 is always 20 bytes / 40 hex chars. If you're getting a different length, you've grabbed the wrong node; use
SHA2if you actually wanted SHA-256. - Remember this is a checksum/puzzle tool, not a password hasher. For password-style key derivation this pack has
Scrypt_Derive, and that's the one to use there.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| key | BYTESLIKE | First key (mandatory) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hash_bytes | BYTESLIKE | — |