Code Snippets

// Cargo.toml: sha2 = "0.10"
use sha2::{Digest, Sha256};

fn main() {
    let mut h = Sha256::new();
    h.update(b"hello world");
    println!("{:x}", h.finalize());
}