hasher

Crates.iohasher
lib.rshasher
version0.1.4
sourcesrc
created_at2019-07-02 10:30:35.070902
updated_at2021-12-06 09:31:31.843859
descriptionPackage hasher provides a Hasher trait.
homepagehttps://github.com/cryptape/hasher
repository
max_upload_size
id145394
size6,499
Yaorong (leeyr338)

documentation

https://github.com/cryptape/hasher/blob/master/README.md

README

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
Commit count: 0

cargo fmt