Function sha256::digest_file[][src]

pub fn digest_file<P: AsRef<Path>>(path: P) -> Result<String, Error>

sha256 digest file

Examples

use sha256::digest_file;
use std::path::Path;
let input = Path::new("./foo.file");
let val = digest_file(input).unwrap();
assert_eq!(val,"433855b7d2b96c23a6f60e70c655eb4305e8806b682a9596a200642f947259b1")