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

#752 in Algorithms

Download history 324/week @ 2023-10-14 468/week @ 2023-10-21 807/week @ 2023-10-28 398/week @ 2023-11-04 603/week @ 2023-11-11 347/week @ 2023-11-18 415/week @ 2023-11-25 579/week @ 2023-12-02 397/week @ 2023-12-09 442/week @ 2023-12-16 445/week @ 2023-12-23 402/week @ 2023-12-30 447/week @ 2024-01-06 225/week @ 2024-01-13 249/week @ 2024-01-20 164/week @ 2024-01-27

1,238 downloads per month
Used in 12 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–440KB