5 releases

0.1.4 Dec 6, 2021
0.1.3 Sep 3, 2019
0.1.2 Jul 2, 2019
0.1.1 Jul 2, 2019
0.1.0 Jul 2, 2019

#1149 in Algorithms

Download history 712/week @ 2024-08-22 438/week @ 2024-08-29 833/week @ 2024-09-05 1246/week @ 2024-09-12 1160/week @ 2024-09-19 1211/week @ 2024-09-26 1107/week @ 2024-10-03 973/week @ 2024-10-10 906/week @ 2024-10-17 795/week @ 2024-10-24 381/week @ 2024-10-31 358/week @ 2024-11-07 577/week @ 2024-11-14 1010/week @ 2024-11-21 323/week @ 2024-11-28 319/week @ 2024-12-05

2,406 downloads per month
Used in 14 crates (6 directly)

MIT license

4KB
70 lines

Hasher

Package hasher provides a Hasher trait.

pub trait Hasher {
    const LENGTH: usize;

    fn digest(&self, data: &[u8]) -> Vec<u8>;
}

Add this to your Cargo.toml:

[dependencies]
hasher = "0.1"

Supported algorithms

  • blake2b
  • keccak
  • sm3

Test

$ cargo test --all-features

Dependencies

~0–450KB