Crates.io | hash-gen |
lib.rs | hash-gen |
version | 1.1.0 |
source | src |
created_at | 2024-09-14 06:31:46.246048 |
updated_at | 2024-09-16 17:09:23.755128 |
description | A command-line tool for generating cryptographic hashes (MD5, SHA1, SHA-256, SHA-512) |
homepage | https://github.com/0xlay/hash-gen/blob/master/README.md |
repository | https://github.com/0xlay/hash-gen |
max_upload_size | |
id | 1374507 |
size | 1,096,212 |
This utility is a command-line tool for generating cryptographic hashes of files or buffers using algorithms like MD5, SHA-1, SHA-256, and SHA-512.
You can easily install the utility directly from crates.io using Cargo, Rust’s package manager. To install the latest version, run:
cargo install hash-gen
This command will download, compile, and install the utility to your Cargo bin directory (~/.cargo/bin by default). Ensure that this directory is in your system’s PATH environment variable to run the command from anywhere.
Alternatively, if you prefer to build the utility from source, you can clone the repository and build it manually:
git clone https://github.com/0xlay/hash-gen.git
cd hash-gen
cargo build --release
The binary will be available in the target/release directory.
Once installed, you can use the utility from the command line to generate cryptographic hashes for files or buffers using different algorithms.
MD5 hash
hash-gen md5 --path /path/to/file.txt
hash-gen md5 --buffer "Hello world"
SHA1 hash
hash-gen sha1 --path /path/to/file.txt
hash-gen sha1 --buffer "Hello world"
SHA256 hash
hash-gen sha256 --path /path/to/file.txt
hash-gen sha256 --buffer "Hello world"
SHA512 hash
hash-gen sha512 --path /path/to/file.txt
hash-gen sha512 --buffer "Hello world"
You can generate the project’s documentation using Rust’s built-in documentation tool, cargo doc. Run the following command:
cargo doc --open
This will generate the documentation and open it in your web browser. You’ll find detailed descriptions of all structs, traits, and methods available in the project.
We welcome contributions to this project. If you’d like to contribute:
We are happy to review any proposed changes.
This project is licensed under the MIT license - see the LICENSE file for details.