file_integrity

Crates.iofile_integrity
lib.rsfile_integrity
version0.1.7
sourcesrc
created_at2023-08-15 14:30:52.633086
updated_at2023-08-18 20:48:09.687456
descriptionA simple lib to make integrity report
homepagehttps://github.com/Akmot9/file_integrity
repositoryhttps://github.com/Akmot9/file_integrity
max_upload_size
id945074
size16,772
Cyprien AVICO (Akmot9)

documentation

README

file_integrity

Crates.io

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.

Features

  • Calculate hashes for a list of files.
  • Calculate hashes for file contents.
  • Generate JSON reports of file integrity status.

Installation

Add this crate to your Cargo.toml:

[dependencies]
file_integrity = "0.1.2"

Usage

Hashing a the all computer files

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);
}
Commit count: 13

cargo fmt