#parallel-processing #simd

yanked chksum-arch

Architecture types and utilities for chksum library

0.1.0-rc3 Mar 2, 2022
0.1.0-rc2 Mar 1, 2022

#6 in #parallel-processing

MIT license

51KB
1.5K SLoC

chksum

Build Coverage Release LICENSE

Simple checksum calculator - for people who wants to make checksum of whole directory but doesn't like piping.

find /path -type f -exec md5sum \{\} + | sort -k1 | md5sum

Running by a CLI

Installation

cargo install chksum-cli

Usage

chksum-cli [options] [--] <path>...

Like

$ chksum-cli LICENSE
3b7c11a62208f03df96f7cfe215b1e28 LICENSE
$ md5sum LICENSE
3b7c11a62208f03df96f7cfe215b1e28  LICENSE
$ chksum-cli --hash SHA1 chksum/ chksum-cli/docs/
c244b8c851d881b8fd2856004e90732bd129cf21 chksum/
5d2c74c21711676e39963098746a3498d29aa3e5 chksum-cli/docs/
$ find chksum-cli/docs/ -type f | sort | xargs cat | sha1sum
5d2c74c21711676e39963098746a3498d29aa3e5  -

Check chksum-cli/README.md for more.

Using as a library

Add to your project

cargo add chksum

Use

Code example.

use chksum::prelude::*;

let digest = File::open("path/to/file")?.chksum(HashAlgorithm::MD5)?;
println!("digest {:x}", digest);

Check chksum/README.md for more.

Hash algorithms

Implemented hash algorithms:

Disclaimer

Code is under development. The interface, both for library and application, may change in the future.

Dependencies