hash-gen-cli
v1.0.0
Published
File and text hash generator/verifier CLI
Maintainers
Readme
hash-gen-cli
File and text hash generator/verifier CLI. Uses Node.js built-in crypto module.
Install
npm install -g @asdsadw12312dwd2112xz/hash-gen-cliUsage
# Hash a file (default: sha256, hex)
hash-gen file ./myfile.txt
hash-gen file ./myfile.txt --algorithm sha512 --encoding base64
# Hash a text string
hash-gen text "hello world"
hash-gen text "hello world" -a md5
# Verify a file against a known hash
hash-gen verify ./myfile.txt <expected-hash>
hash-gen verify ./myfile.txt <expected-hash> -a sha512
# Compare two files by hash
hash-gen compare file1.txt file2.txt
# List all available algorithms
hash-gen listOptions
| Option | Short | Default | Description |
|--------|-------|---------|-------------|
| --algorithm | -a | sha256 | Hash algorithm |
| --encoding | -e | hex | Output encoding (hex or base64) |
Algorithms
Supports all algorithms provided by Node.js crypto.getHashes(): md5, sha1, sha256, sha384, sha512, sha3-256, and many more. Run hash-gen list to see all.
License
MIT
