Crates.io | sapphire-hash |
lib.rs | sapphire-hash |
version | 0.1.2 |
source | src |
created_at | 2024-03-16 03:35:10.571204 |
updated_at | 2024-05-07 01:36:56.307146 |
description | A recursive, performant file hash calculator. |
homepage | |
repository | https://github.com/rhian-cs/sapphire-hash |
max_upload_size | |
id | 1175382 |
size | 31,997 |
A recursive, performant hash calculator written in Rust!
Command-line Tool | Graphical User Interface |
---|---|
Download the app from the releases page, extract it an run it.
Install Rust and Cargo: https://rustup.rs/
Install the app with:
cargo install sapphire-hash
Run with:
sapphire-hash --algorithm <ALGORITHM> <DIRECTORY>
Where:
DIRECTORY
can be either the relative or the full path to the desired directory or file.ALGORITHM
is the desired hash algorithm. Only algorithms implemented by OpenSSL are available:
md5
sha1
sha224
sha256
sha384
sha512
sha3_224
sha3_256
sha3_384
sha3_512
shake128
shake256
ripemd160
sm3
Optionally, you can add an --output <OUTPUT_PATH>
to specify the output. End the file in .csv
to generate a CSV report.
You may also enable logging by using the RUST_LOG=trace
environment variable.
If you want to pipe the results and log results to separate files, you may use:
RUST_LOG=trace sapphire-hash --algorithm ALGORITHM DIRECTORY | tee result.txt 2>/dev/stdout | tee log.txt
build-essential
sudo apt install libssl-dev
vcpkg install openssl
Clone the repository.
If you're on Windows you might need to specify the path to OpenSSL using the OPENSSL_DIR
environment variable. This is the path that has the lib\
and include\
folders. You can do this by running:
# Windows only
$env:OPENSSL_DIR="C:\path_to_vckpg\packages\openssl_x64-windows"
Run cargo build
.
Use the app like so:
./target/debug/sapphire-hash --algorithm ALGORITHM DIRECTORY
Run:
OPENSSL_STATIC=true cargo build --release
Use the app like so:
./target/release/sapphire-hash --algorithm ALGORITHM DIRECTORY
Run:
cargo test
Use the script for creating random files: scripts/generate_example_files.sh
Check the script code for available options.
Run:
RUSTFLAGS=-Dwarnings cargo clippy --all-targets --all-features
Whenever you update the flutter_bridge
project, be sure to run the codegen so that the Flutter project picks up the changes. Inside gui_flutter
, run:
flutter_rust_bridge_codegen generate
See more about GUI development in flutter_gui/README.md