# Hash Tool Zero-dependency hashing/verification (md5, sha1, sha224/256/384/512). ``` python scripts/run.py file.zip python scripts/run.py file.zip -a md5 python scripts/run.py "hello world" --text -a sha256 python scripts/run.py file.zip -a all python scripts/run.py file.zip -a sha256 -c 9f86d0818... cat file.bin | python scripts/run.py - ``` Built on stdlib `hashlib`; streams files in 64KB chunks. --- name: hash-tool display_name: Hash Tool description: "Compute md5/sha1/sha256/sha512 hashes of text or files and verify against an expected digest. Triggers: hash file, sha256, md5 checksum, verify hash, compute digest." --- # Hash Tool Compute and verify cryptographic hashes of text or files. ## When to use The user wants a checksum/digest of some text or a file, or needs to verify a download/file matches a known hash. ## How to use Run `scripts/run.py`: - `python scripts/run.py file.zip` — sha256 of a file (default algo). - `python scripts/run.py file.zip -a md5` — pick an algorithm. - `python scripts/run.py "hello" --text -a sha1` — hash a literal string. - `python scripts/run.py file.zip -a all` — all algorithms at once. - `python scripts/run.py file.zip -a sha256 -c <expected>` — verify (exit 0 if match). Read from stdin with `-`, e.g. `cat file | python scripts/run.py -`. ## Pitfalls - Without `--text`, SOURCE is a filename; use `--text` to hash a literal string. - Files are hashed as raw bytes; `--text` hashes UTF-8 bytes of the string. - `--check` requires exactly one algorithm and is case-insensitive; mismatch exits 1.
Hash Tool by langbot-team
Compute md5/sha1/sha256/sha512 hashes of text or files and verify against an expected digest.
Loading...