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

#1132 in Algorithms

Download history 368/week @ 2024-07-23 350/week @ 2024-07-30 367/week @ 2024-08-06 626/week @ 2024-08-13 739/week @ 2024-08-20 561/week @ 2024-08-27 526/week @ 2024-09-03 1236/week @ 2024-09-10 983/week @ 2024-09-17 1396/week @ 2024-09-24 1031/week @ 2024-10-01 1171/week @ 2024-10-08 724/week @ 2024-10-15 1112/week @ 2024-10-22 399/week @ 2024-10-29 217/week @ 2024-11-05

2,830 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