@lxgicstudios/hash-it
v1.0.0
Published
Hash passwords with bcrypt, generate file checksums (SHA-256, SHA-512, MD5), and verify hashes. Fast CLI hashing tool powered by Node crypto.
Maintainers
Readme
hash-it
Hash passwords with bcrypt, generate file checksums (SHA-256, SHA-512, MD5), and verify hashes. All from the command line. One dependency (bcryptjs).
Install
npm install -g @lxgicstudios/hash-itOr run directly:
npx @lxgicstudios/hash-it password "my-secret"Features
- Hash passwords with bcrypt (configurable rounds)
- Verify passwords against bcrypt hashes
- Generate file checksums (SHA-256, SHA-512, MD5)
- Hash arbitrary text strings
- Multiple output encodings (hex, base64)
- JSON output for scripting
- Colorful terminal output
- Just one external dependency (bcryptjs)
Usage
Hash a password
hash-it password "my-secret-password"
# => $2a$10$K8Y1...Verify a password
hash-it verify "my-secret" '$2a$10$K8Y1...'
# => MATCH or NO MATCHFile checksum
hash-it checksum package.json
# => SHA-256: a1b2c3d4...
hash-it checksum --algo md5 large-file.zip
# => MD5: e5f6a7b8...Hash text
hash-it text "hello world"
# => SHA-256: b94d27b9...
hash-it text --algo sha512 "hello world"Options
| Option | Alias | Default | Description |
|--------|-------|---------|-------------|
| --help | -h | | Show help message |
| --json | | | Output as JSON |
| --algo | -a | sha256 | Hash algorithm: sha256, sha512, md5 |
| --rounds | -r | 10 | Bcrypt salt rounds |
| --encoding | -e | hex | Output encoding: hex, base64 |
Commands
| Command | Description |
|---------|-------------|
| password <text> | Hash a password with bcrypt |
| verify <text> <hash> | Verify password against bcrypt hash |
| checksum <file> | Generate file checksum |
| text <string> | Hash a text string |
License
MIT - LXGIC Studios
