Skip to content

krl/bytehash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ByteHash

Trait abstracting over hash-functions, allowing digests to be viewed as byte slices.

This allows you to use cryptographic and non-cryptographic hash functions interchangeably.

Documentation

Example

use bytehash::{Blake2b, ByteHash, Wrapped};
use std::collections::hash_map::DefaultHasher;

fn main() {
    let mut blake = Blake2b::default();
    blake.write(b"hello world").unwrap();
    let hash = blake.fin();

    let mut default = Wrapped::<DefaultHasher>::default();
    default.write(b"hello world").unwrap();
    let hash = default.fin();
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages