Skip to content

Commit

Permalink
Blake3 support (#91)
Browse files Browse the repository at this point in the history
* Added blake3 crate dependency

* Added BLAKE3-Hash algorithm

* Added Blake3 to list of supported algorithm

* Adds #89
  • Loading branch information
vschwaberow authored Mar 10, 2024
1 parent 8f6f9ca commit b2ad6cd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
35 changes: 34 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustgenhash"
version = "0.9.3"
version = "0.9.4"
license = "MIT"
authors = ["Volker Schwaberow <volker@schwaberow.de>"]
description = "A tool to generate hashes from the command line."
Expand Down Expand Up @@ -35,6 +35,7 @@ base64 = "0.13.0"
bcrypt-pbkdf = "0.9.0"
belt-hash = "0.1.0"
blake2 = "0.10.4"
blake3 = { version = "1.5.0", features = ["traits-preview"] }
clap = { version = "4.0.10", features = ["derive", "cargo"] }
clap_complete = "4.0.2"
digest = { version = "0.10.5", features = ["std"] }
Expand Down
1 change: 1 addition & 0 deletions src/rgh/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub enum Algorithm {
Belthash,
Blake2b,
Blake2s,
Blake3,
Fsb160,
Fsb224,
Fsb256,
Expand Down
2 changes: 1 addition & 1 deletion src/rgh/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl RHash {
"BELTHASH" => Box::new(belt_hash::BeltHash::new()),
"BLAKE2B" => Box::new(blake2::Blake2b512::new()),
"BLAKE2S" => Box::new(blake2::Blake2s256::new()),
"BLAKE3" => Box::new(blake3::Hasher::new()),
"FSB160" => Box::new(fsb::Fsb160::new()),
"FSB224" => Box::new(fsb::Fsb224::new()),
"FSB256" => Box::new(fsb::Fsb256::new()),
Expand Down Expand Up @@ -301,4 +302,3 @@ impl RHash {
}
}
}

0 comments on commit b2ad6cd

Please sign in to comment.