Crate file_hashing

Source
Expand description

This crate will help you easily get hash from files or folders

§Example

use std::path::PathBuf;
use blake2::{Blake2s256, Digest};
use file_hashing::get_hash_file;

let path = PathBuf::from("/home/gladi/test-hashing.txt");

let mut hash = Blake2s256::new();
let result = get_hash_file(&path, &mut hash).unwrap();

assert_eq!(result.len(), 64); // Blake2s256 len == 64

P.S. If the examples from the documentation do not work, then you need to look at the unit tests

Re-exports§

pub use file::get_hash_file;
pub use file::get_hash_files;
pub use folder::get_hash_folder;
pub use folder::get_hash_folders;

Modules§

file
File functions
folder
Folder functions
fs
Just wrappers for the filesystem

Enums§

ProgressInfo
Information about progress