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

#230 in Cryptography

Download history 502/week @ 2022-08-10 335/week @ 2022-08-17 257/week @ 2022-08-24 1106/week @ 2022-08-31 564/week @ 2022-09-07 1146/week @ 2022-09-14 326/week @ 2022-09-21 255/week @ 2022-09-28 303/week @ 2022-10-05 144/week @ 2022-10-12 351/week @ 2022-10-19 304/week @ 2022-10-26 200/week @ 2022-11-02 446/week @ 2022-11-09 263/week @ 2022-11-16 285/week @ 2022-11-23

1,302 downloads per month
Used in 6 crates (4 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–290KB