| Crates.io | file-hasher |
| lib.rs | file-hasher |
| version | 0.1.0 |
| created_at | 2025-07-04 06:14:34.198086+00 |
| updated_at | 2025-07-04 06:14:34.198086+00 |
| description | A fast and efficient CLI tool for calculating SHA256, SHA1, and MD5 hashes of files with progress indication and colored output |
| homepage | |
| repository | https://github.com/marcuspat/file-hasher |
| max_upload_size | |
| id | 1737517 |
| size | 78,167 |
A fast and efficient CLI tool for calculating SHA256, SHA1, and MD5 hashes of files with progress indication and colored output. Optimized for performance with streaming support for large files.
cargo install file-hasher
git clone https://github.com/marcuspat/file-hasher
cd file-hasher
cargo install --path .
Hash a single file with SHA256 (default):
file-hasher file.txt
Hash multiple files at once:
file-hasher file1.txt file2.txt file3.txt
Choose a specific hash algorithm:
file-hasher --algorithm md5 file.txt
file-hasher --algorithm sha1 file.txt
file-hasher --algorithm sha256 file.txt
Calculate all hash types at once:
file-hasher --algorithm all file.txt
Verify a file against a known hash:
file-hasher --verify dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f file.txt
Verify with a specific algorithm:
file-hasher --algorithm md5 --verify 65a8e27d8879283831b664bd8b7f0ad4 file.txt
# Hash a large file (shows progress bar)
$ file-hasher large-video.mp4
File: large-video.mp4
SHA256: a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456
# Hash multiple files with all algorithms
$ file-hasher --algorithm all doc1.pdf doc2.pdf
File: doc1.pdf
SHA256: 123abc...
MD5: 456def...
SHA1: 789ghi...
File: doc2.pdf
SHA256: abc123...
MD5: def456...
SHA1: ghi789...
# Verify a downloaded file
$ file-hasher --verify expected_hash_here download.zip
✓ MATCH: Hash verification for 'download.zip'
Expected: expected_hash_here
Computed: expected_hash_here
cargo test
cargo clippy -- -D warnings
cargo fmt -- --check
The project includes GitHub Actions workflows that run on every push and pull request:
File Hasher is optimized for speed and memory efficiency:
--algorithm all, file is read only onceContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.