WriteHasher
Hash the data being written to a writer.
Supports tokio::io::AsyncWrite
, futures::io::AsyncWrite
, std::io::Write
.
Example
extern crate sha2;
use Sha256;
use WriteHasher;
let mut file = open.unwrap;
let dest = sink;
let dest = new;
copy.unwrap;
let hash = dest.finalize;
You can use async functions as well as std functions for this as well.