ahsah 2.1.0

Incremental hashing contexts for MD5 and SHA-2 with reader helpers and optional SIMD decode paths
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use ahsah::{Digest, Sha256};
use std::io;

fn main() {
    let mut hasher = Sha256::new();
    let stdin = io::stdin();
    for line in stdin.lines() {
        let line = line.expect("Unable to read line from stdin");
        hasher.update(line.as_bytes());
    }
    println!("Hashing {} bytes.", hasher.input_size());
    println!("{}", hasher.finalize_hex());
}