SHA-2 Hashing
The hash you actually want, all six flavors in one node
- key
- hash_bytes
If you hash anything in this pack, this is probably the node you want. SHA-2 is the modern default - it's what TLS, git, and your Linux distro's package manager all rely on - and it's nowhere near broken. The SHA2 node gives you all six members of the family behind a single dropdown, which sounds like more than it is because you'll live at one setting: SHA256.
How it works
Two inputs:
- key1 (BYTESLIKE) - the data to hash. The "key" name is the pack's shared hashing convention; it's just your input bytes.
- algorithm - a dropdown with
SHA224,SHA256,SHA384,SHA512,SHA512_224,SHA512_256.
Output is hash_bytes, a BYTESLIKE digest of the algorithm's fixed size (32 bytes for SHA-256, 64 for SHA-512, and so on). Everything rides on the cryptography library, so the hashes are the real deal. The three-way split of SHA-512 variants exists because the truncated SHA-512 variants are a niche thing some protocols and puzzles use - you will almost certainly never touch them, but they're there if a puzzle demands a specific one.
The choices, decoded
- SHA256 - the one. 32-byte output, universally recognized, and what most ARG checksums will expect.
- SHA512 - longer digest, slower, used where a puzzle explicitly asks for it.
- SHA224 / SHA384 - truncated variants, same engine as SHA-256/SHA-512 respectively.
- SHA512_224 / SHA512_256 - the truncation-only-in-the-name ones. Leave them alone unless a puzzle literally specifies them.
Where it fits
Hash a string, pipe the digest through String2Hex, and you have the familiar 64-char hex checksum that belongs in a puzzle file. Or use SHA2 to build hash chains - hash the output of a previous step to make a puzzle ladder. It's also the honest counterpart to SHA1 in this pack: same category, same interface, but the one you'd use for anything that's supposed to survive scrutiny.
Installing it
Ships in ComfyUI ARG Toolkit - ComfyUI Manager (search "ComfyUI ARG Toolkit") or:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Restart ComfyUI. Dependencies come via Manager; no model files.
Common issues
- Bytes errors - convert plain text to bytes first.
- Wrong output length - SHA-256 gives 32 bytes (64 hex chars), SHA-512 gives 64 bytes. If your puzzle's checksum length doesn't match, you picked the wrong variant.
- The two inputs are the only ones you'll ever set; there's no salt or nonce here because this is a plain hash, not a key derivation function. If you need salted, slow hashing,
Scrypt_Deriveis the pack's tool for that.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| key | BYTESLIKE | First key (mandatory) | |
| algorithm | COMBO | 6 options: SHA224, SHA256, SHA384, SHA512, SHA512_224, SHA512_256 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hash_bytes | BYTESLIKE | — |