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
//! Fast multi-algorithm hashing for files, streams, and byte slices.
//!
//! HashJunkie computes many standard, cloud, and file-sharing hashes in one
//! streaming pass. The high-level helpers are usually the right API for Rust
//! applications:
//!
//! ```
//! use hashjunkie::{Algorithm, hash_bytes};
//!
//! let result = hash_bytes(b"hello", &[Algorithm::Blake3, Algorithm::Sha256]);
//! assert_eq!(
//! result.standard(Algorithm::Sha256),
//! Some("2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824")
//! );
//! ```
//!
//! For files and arbitrary [`std::io::Read`] sources, use [`hash_file`] or
//! [`hash_reader`]. These helpers use the same pipelined multi-hash engine as
//! the CLI when several algorithms are requested.
//!
//! ```
//! # use std::io::Cursor;
//! use hashjunkie::{Algorithm, hash_reader};
//!
//! let reader = Cursor::new(b"hello");
//! let result = hash_reader(reader, &[Algorithm::CidV1, Algorithm::Blake3])?;
//! assert!(result.standard(Algorithm::CidV1).unwrap().starts_with("bafk"));
//! # Ok::<(), hashjunkie::HashError>(())
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use HashResult;