Crates.io | file_integrity |
lib.rs | file_integrity |
version | 0.1.7 |
source | src |
created_at | 2023-08-15 14:30:52.633086 |
updated_at | 2023-08-18 20:48:09.687456 |
description | A simple lib to make integrity report |
homepage | https://github.com/Akmot9/file_integrity |
repository | https://github.com/Akmot9/file_integrity |
max_upload_size | |
id | 945074 |
size | 16,772 |
The File Integrity Library is a Rust crate designed to help you calculate MD5 hashes for files and generate JSON reports of the file integrity status. This can be useful for verifying the integrity of files in a list, such as during software distribution or system monitoring.
Add this crate to your Cargo.toml:
[dependencies]
file_integrity = "0.1.2"
fn main() {
let folder_path = "/" ;
let nbs_of_file = list_files(&folder_path);
log!("INFOS: Number of files: {nbs_of_file}");
let file_path_list = "file_list.txt";
let hashs = hash_file_list(file_path_list);
let name = "outp2ut.json" ;
write_json_file(&hashs, &name);
}