Function ohash::create_hash
source · Expand description
Creates a hash for a file
Example:
use std::fs::File;
use media_hasher::{HASH_BLK_SIZE, create_hash};
let file = File::open("breakdance.avi").unwrap();
let fsize = file.metadata().unwrap().len();
let fhash = create_hash(file, fsize).unwrap();
assert_eq!(fhash, "8e245d9679d31e12");