3 unstable releases

0.2.2 Nov 18, 2020
0.2.1 Feb 9, 2020
0.1.0 Feb 4, 2020

#6 in #integrity

MIT license

208 lines


File hash checker ("fhc") represents a minimal solution meeting the following requirements:

  • Calculate the SHA256 hash of one or more files in parallel
  • Minimal external dependencies:
  • Provide a library function than returns the SHA256 hash as a hex string for a string path
  • Provide a CLI utiility:
    • Simpler and more straightforward usage than sha256sum
    • Save the SHA256 hash to an adjacent .sha256 file (if it doesn't already exist)
    • Compare the current SHA256 hash to an adjacent .sha256 file (if it exists)



cargo install fhc


git clone https://github.com/qtfkwk/fhc.git
cd fhc
cargo install --path=.


$ fhc -h
# fhc (file hash checker), 0.2.2, 2020-11-18

Usage: `fhc [-h|--help] [--version] [-p|--process OPTION] [file]`

Option/argument       | Description
`-h|--help`           | show help
`--version`           | show version/date
`-p|--process OPTION` | process option: messaging*, threading, sequential
`file`                | one or more file paths


  1. Run fhc against one or more files to calculate and print the SHA256 hash for each file to stdout and save in adjacent .sha256 files.
  2. At any later point, run fhc against one or more files with adjacent .sha256 files to re-calculate the SHA256 hash for each file and report OK if the hashes match and FAILED if the hashes do not match.


The test.log file saves the output of cargo test 2>&1 |tee test.log at each commit.


  • 0.1.0 (2020-02-03): initial public release
  • 0.2.1 (2020-02-09): produce .sha256 files compatible w/ sha256sum -c
  • 0.2.2 (2020-11-18): update sha2 crate version


~12K SLoC