| Crates.io | file-hashing |
| lib.rs | file-hashing |
| version | 0.1.2 |
| created_at | 2022-11-04 17:43:59.914932+00 |
| updated_at | 2022-12-22 11:34:57.174045+00 |
| description | Library for hashing files and folders |
| homepage | |
| repository | https://github.com/CryptoGladi/file-hashing |
| max_upload_size | |
| id | 705326 |
| size | 24,642 |
This crate will help you easily get hash from files or folders
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
Each time we write our own function to get the hash from a file or folder. We repeat ourselves and violate the DRY principle. With this crate you can save a couple of hours
License: MIT