Function ohash::create_hash

source ·
pub fn create_hash(file: File, fsize: u64) -> Result<String, Error>
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");