Function checkasum::hashing::hash_file_path
source · pub fn hash_file_path(
hashing_method: &HashAlgorithm,
path: &Path
) -> Result<String, Error>
Expand description
Hashes a supplied file (based on file path) using the selected algorithm
§Examples
use checkasum::hashing::hash_file_path;
use checkasum::hashing::HashAlgorithm::SHA256;
let _file_hash = hash_file_path(&SHA256, "/bob/path/to/file.iso".as_ref());
§Errors
Bubbles up errors from file_reader Bubbles up errors from attempting file hashing