Hashit is a command-line tool that supports various hash functions for files and strings. It provides an easy way to compute hashes using algorithms like Adler-32, MD4, MD5, SHA-1, SHA-2, SHA-3, FNV, and CRC.
- Hash files and strings using multiple hash functions.
- Supports the following hash algorithms:
- Adler-32
- MD4
- MD5
- SHA-1
- SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256)
- SHA-3 (SHA-256, SHA-512, Shake128, Shake256)
- FNV (FNV-1, FNV-1a, 32-bit and 64-bit variants)
- CRC (CRC32, CRC64)
Use Go to install the package for you.
go install github.com/TechMDW/hashit@latest
You can download the latest binary from here.
Clone the repository and build the binary
git clone https://github.com/TechMDW/hashit.git
cd hashit
go build -o hashit ./main.go
PS: For windows you wanna add the correct extensions, for example .exe
.
To hash a string, simply pass the string as an argument to the hashit binary:
hashit "hello world"
To hash a file, use the -f flag followed by the file path:
hashit -f /path/to/file
To use a specific hash algorithm, use the -t flag followed by the hash type:
./hashit "hello world" -t md5
./hashit -f /path/to/file -t sha256
To list all available hash functions, use the list-hashes command:
./hashit list-hashes
To see the help information, use the --help flag:
./hashit --help
To run the tests, use the following command:
go test ./...
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.