Skip to content

Akmot9/file_integrity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

A custom crate to hash files for integrity reports.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages