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
//! # ThreatFlux Hashing
//!
//! A high-performance async file hashing library supporting MD5, SHA256, SHA512, and BLAKE3.
//!
//! ## Features
//!
//! - Async/await support with tokio
//! - Concurrent hash calculation
//! - Configurable buffer sizes and concurrency limits
//! - Optional serde support
//! - Zero-copy operations where possible
//!
//! ## Quick Start
//!
//! ```no_run
//! use threatflux_hashing::calculate_all_hashes;
//! use std::path::Path;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let hashes = calculate_all_hashes(Path::new("file.bin")).await?;
//! println!("MD5: {:?}", hashes.md5);
//! println!("SHA256: {:?}", hashes.sha256);
//! println!("SHA512: {:?}", hashes.sha512);
//! println!("BLAKE3: {:?}", hashes.blake3);
//! Ok(())
//! }
//! ```
//!
//! ## Custom Configuration
//!
//! ```no_run
//! use threatflux_hashing::{calculate_all_hashes_with_config, HashConfig, HashAlgorithms};
//! use std::path::Path;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = HashConfig {
//! algorithms: HashAlgorithms {
//! md5: true,
//! sha256: true,
//! sha512: false, // Skip SHA512
//! blake3: true,
//! },
//! buffer_size: 16384, // 16KB buffer
//! max_concurrent_operations: 20,
//! };
//!
//! let hashes = calculate_all_hashes_with_config(Path::new("file.bin"), &config).await?;
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
// Re-export futures for convenience
pub use tokio;