blake2 0.6.0

BLAKE2 hash functions

An implementation of the BLAKE2 hash functions.

Based on the work of Cesar Barros.

Usage

An example of using Blake2b is:

use blake2::{Blake2b, Digest};

// create a Blake2b object
let mut hasher = Blake2b::default();

// write input message
hasher.input(b"hello world");

// read hash digest and consume hasher
let output = hasher.result();
println!("{:x}", output);

Same for Blake2s:

use blake2::{Blake2s, Digest};

let mut hasher = Blake2s::default();
hasher.input(b"hello world");
let output = hasher.result();
println!("{:x}", output);