Skip to content

Commit

Permalink
chore: new hash interface
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 9, 2024
1 parent 365fe15 commit f1281cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/hashing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ edition = "2018"

[features]
simd = []

[dependencies]
boytacean-common = { path = "../common", version = "0.10.7" }
7 changes: 7 additions & 0 deletions crates/hashing/src/hash.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use boytacean_common::error::Error;

pub trait Hash {
type Options;

fn hash(data: &[u8], options: &Self::Options) -> Result<Vec<u8>, Error>;
}
1 change: 1 addition & 0 deletions crates/hashing/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod crc32;
pub mod crc32c;
pub mod hash;

0 comments on commit f1281cd

Please sign in to comment.