1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! An implementation of the [BLAKE2][1] hash functions.
//!
//! Based on the [work][2] of Cesar Barros.
//!
//! # Usage
//!
//! An example of using `Blake2b` is:
//!
//! ```rust
//! 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`:
//!
//! ```rust
//! use blake2::{Blake2s, Digest};
//!
//! let mut hasher = Blake2s::default();
//! hasher.input(b"hello world");
//! let output = hasher.result();
//! println!("{:x}", output);
//! ```
//!
//! [1]: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2
//! [2]: https://github.com/cesarb/blake2-rfc
extern crate byte_tools;
extern crate digest;
// extern crate crypto_mac;
//extern crate crypto_ops;
extern crate generic_array;
pub use Digest;
pub use Blake2b;
pub use Blake2s;