Advanced and fast hash generator/checker for files and plain text. Using Tauri!
Characteristics | Essentials | Full |
---|---|---|
Free, forever | ✅ | ✅ |
Made with love | ✅ | ✅ |
FOSS | ✅ | ✅ |
GPLv3 | ✅ | ✅ |
Lighweight | ✅ | ❌ |
Supported Algorithms |
Essentials | Full |
---|---|---|
md5 | ✅ | ✅ |
sha-1 | 256 | 512 | ✅ | ✅ |
md5 | ✅ | ✅ |
crc-32 | ✅ | ✅ |
whirlpool | ❌ | ✅ |
BLAKE-3 | ❌ | ✅ |
belT | ❌ | ✅ |
- It's important to add this tauri plugin before starting. Should be installed by
running
npm install
inside the project dir.
pnpm add github:tauri-apps/tauri-plugin-fs-extra
npm install github:tauri-apps/tauri-plugin-fs-extra
All extra hash functions should be added only for the full version, keep in mind to enable the function to work with the "full" feature. If you think a function is used enough to be bundled inside full and essentials edition, please discuss it in you PR.
I've tried to make the coding easier for adding more hash algorithms, though isn't something like a plugin but more than a extra code to be added.
- Check if the hash is in crates.io
- Go to
src-tauri\Cargo.toml
, and edit this line under[dependencies]
: You should add theoptional = "true"
line. For example, let's call a brand new hash "foo"
## Hashes:
md5 = "0.7.0" # MIT
# ...
whirlpool = { version ="0.10.1", optional = true } # MIT
belt-hash = {version = "0.1.0", optional = true} # MIT or APACHE2
# add here other hash functions:
foo = {version "x.x.x", optional = true}
- Edit this line in
Cargo.toml
:
[features]
full = ["dep:blake3", "dep:whirlpool", "dep:belt-hash", "dep:foo"]
- Go to
src-tauri\src\main.rs
. Add a new entry insidebytes_hash_processing()
:
#[cfg(feature="full")]
fn bytes_hash_processing(input: &[u8], hashType: &str) -> OutputToJS {
let now = Instant::now();
let output = match hashType {
"md5" => allsum_md5(input),
// some stuff ommited here
"foo" => allsum_foo(input),
_ => format!("Hash type '{}' is not avaliable", hashType)
};
- Go to
src-tauri\src\algorithms.rs
and create a new function at the end of the file.
The function must have a[&u8]
input and aString
output. The function content doesn't matter if the hash works for text and files.
If your hash function is using theDigest
crate or it's inside RustCrypto/hashes repo, it's easy to implement!:
#[cfg(feature="full")]
pub fn allsum_foo(foo_input:&[u8])-> String {
eprintln!("Generating foo output");
let mut hasher = foo_hash::FooHash::new();
hasher.update(foo_input);
let result = hasher.finalize();
format!("{:x}", result)
}
- Go to
src-tauri/src/features.rs
and add the new hash insidealgorithms_selector_string()
function (THE FULL VERSION FUNCTION, NOT THE SECOND ONE!). The function should have#[cfg(feature="full")]
at the top!:
#[cfg(feature="full")] // FULL VERSION
#[tauri::command]
pub fn algorithms_selector_string() -> String{
let enabled_algorithms:Vec<&str> = vec![..., "foo",];
...
}
- Congrats! Your hash function is added!. Now test it with
pnpm tauri dev -f full
- Donate symbol: Icon made from Icon Fonts is licensed by CC BY 3.0