High-performance cryptographic hash utility with SIMD optimization.
- Algorithms: MD5, SHA-1, SHA-2/3, BLAKE2/3, xxHash3/128
- SIMD: Automatic hardware acceleration (SSE, AVX, AVX2, AVX-512, NEON)
- Fast Mode: Quick hashing for large files (samples 300MB)
- Flexible Input: Files, stdin, or text strings
- Wildcard Patterns: Support for *, ?, and [...] patterns in file/directory arguments
- Directory Scanning: Recursive hashing with parallel processing
- Verification: Compare hashes against stored database
- Database Comparison: Compare two databases to identify changes, duplicates, and differences
- .hashignore: Exclude files using gitignore patterns
- Formats: Standard, hashdeep, JSON
- Compression: LZMA compression for databases
- Cross-Platform: Linux, macOS, Windows, FreeBSD
Hash multiple files using wildcard patterns:
Patterns work with all commands:
Output shows: Matches, Mismatches, Missing files, New files
Compare two hash databases to identify changes, duplicates, and differences:
Output shows:
- Unchanged: Files with same hash in both databases
- Changed: Files with different hashes
- Removed: Files in DB1 but not DB2
- Added: Files in DB2 but not DB1
- Duplicates: Files with same hash within each database
| FILE | File or wildcard pattern to hash (omit for stdin) | |
| -t, --text <TEXT> | Hash text string | |
| -a, --algorithm <ALG> | Algorithm (default: sha256) | |
| -o, --output <FILE> | Write to file | |
| -f, --fast | Fast mode (samples 300MB) | |
| --json | JSON output | |
| scan | -d, --directory <DIR> | Directory or wildcard pattern to scan |
| -a, --algorithm <ALG> | Algorithm (default: sha256) | |
| -o, --output <FILE> | Output database | |
| -p, --parallel | Parallel processing | |
| -f, --fast | Fast mode | |
| --format <FMT> | standard or hashdeep | |
| --compress | LZMA compression | |
| --json | JSON output | |
| verify | -b, --database <FILE> | Database file or wildcard pattern |
| -d, --directory <DIR> | Directory or wildcard pattern to verify | |
| --json | JSON output | |
| compare | DATABASE1 | First database file (supports .xz) |
| DATABASE2 | Second database file (supports .xz) | |
| -o, --output <FILE> | Write report to file | |
| --format <FMT> | plain-text, json, or hashdeep | |
| benchmark | -s, --size <MB> | Data size (default: 100) |
| --json | JSON output |
Exclude files using gitignore-style patterns:
Patterns: *.ext, dir/, !pattern, #comments, **/*.ext
Standard (default):
Hashdeep: CSV format with file size, compatible with hashdeep tool
JSON: Structured output for automation
| xxHash3 | 10-30 GB/s | Non-crypto, max speed |
| BLAKE3 | 1-3 GB/s | Crypto, fastest |
| SHA-512 | 600-900 MB/s | Crypto, 64-bit |
| SHA-256 | 500-800 MB/s | Crypto, common |
| SHA3-256 | 200-400 MB/s | Post-quantum |
Tips:
- Use -p for parallel (2-4x faster)
- Use -f for large files (10-100x faster)
- Use BLAKE3 for fastest crypto
- Compile with RUSTFLAGS="-C target-cpu=native" for best performance
Fast Mode Speedup:
- 1 GB: ~7x faster
- 10 GB: ~67x faster
- 100 GB: ~667x faster
Samples 300MB (first/middle/last 100MB) instead of entire file.
Good for: Quick checks, large files, backups Not for: Full verification, forensics, small files
Recommended:
- SHA-256: Widely supported, good security
- BLAKE3: Fastest cryptographic hash
- SHA3-256: Post-quantum resistant
Deprecated:
- MD5, SHA-1: Use only for compatibility
Non-crypto (trusted environments):
- xxHash3/128: Maximum speed
Automatic support for SSE, AVX, AVX2, AVX-512 (x86_64) and NEON (ARM).
Verify: cargo test --release --test simd_verification -- --nocapture
See SIMD_OPTIMIZATION.md for details.
Supported patterns:
- * - Matches any number of characters (e.g., *.txt, file*)
- ? - Matches exactly one character (e.g., file?.bin)
- [...] - Matches any character in brackets (e.g., [abc]*.jpg)
Examples:
Notes:
- Patterns are expanded by the shell or the application
- If no files match, an error is displayed
- Multiple matches are processed in sorted order
- For scan/verify with multiple directories, results are aggregated
| Unsupported algorithm | Run hash list to see available algorithms |
| Permission errors | Use sudo hash scan -d /protected/dir ... |
| Slow performance | Use -p for parallel, -f for fast mode, or BLAKE3 |
| Fast mode not working | Fast mode only works with files (not stdin/text) |
| .hashignore not working | Check file location: /path/to/dir/.hashignore |
| Wildcard pattern not matching | Ensure pattern is quoted (e.g., "*.txt" not *.txt) |
| No files match pattern | Check pattern syntax and file locations |
.png)

