Giter Club home page Giter Club logo

fhc's Introduction

About

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)

Installation

User

cargo install fhc

Developer

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

Usage

$ fhc -h
# fhc (file hash checker), 0.2.1, 2020-02-09

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

Example

  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.

Tests

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

Changelog

  • 0.1.0 (2020-02-03): initial public release
  • 0.2.1 (2020-02-09): produce .sha256 files compatible w/ sha256sum -c

fhc's People

Contributors

sassman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.