hashjunkie 0.6.0

Fast multi-algorithm hashing library with file-sharing and cloud hash support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;

use hashjunkie::{Algorithm, hash_file};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let path = env::args()
        .nth(1)
        .expect("usage: cargo run -p hashjunkie --example hash_file -- PATH");
    let result = hash_file(path, &[Algorithm::Blake3, Algorithm::Sha256])?;

    for (algorithm, digest) in &result {
        println!("{algorithm}: {}", digest.standard());
    }

    Ok(())
}