hashsum-0.1.0 is not a library.
hashsum
CLI to print or verify cryptographic checksums (md5, sha1, sha2 family, belt-hash).
Install
From local path:
From Git repository:
From crates.io (after publishing):
Usage
- When no
FILEis given, or when-is used, input is read from stdin. - Default algorithm is
md5.
Options
-a, --algorithm <ALG>: Hash algorithm (md5,sha1,sha224,sha256,sha384,sha512,belt-hash)-c, --check: Read checksums from the given files and verify them--ignore-missing(with--check): Do not fail on missing files-q, --quiet(with--check): Do not printOKfor each successfully verified file--status(with--check): Do not print anything; use exit status only--strict(with--check): Treat malformed lines as fatal errors-w, --warn(with--check): Warn about malformed lines
Algorithms
- md5
- sha1
- sha224, sha256, sha384, sha512
- belt-hash
Output format
When computing hashes:
<hex-digest> <filename>
When verifying with --check, the input format supported is compatible with common tools:
<hex-digest> <filename>
<hex-digest> *<filename>
On success (unless --quiet or --status):
<filename>: OK
On mismatch:
<filename>: FAILED
Examples
Compute SHA-256 of a file:
Verify checksums listed in checksums.txt:
Read from stdin:
|
Exit codes
0: success (all requested operations succeeded)1: at least one file failed, IO error, or malformed line in strict mode