SHACKSUM¶
Synopsis¶
checkmode(verify)
sha-checksum [--check CHECKFILE] [OPTIONS]
calcmode
sha-checksum [-a ARGORITHM] [OPTIONS] File1 File2 ...
Summary¶
Compute and verify file hashes with SHA.
Quick Start¶
Calculate The file(calcmode)
$ sha-checksum -a sha3-224 /usr/bin/python3
SHA3-224(/usr/bin/python3)= a929ab975d76109f41b53b148f196348bd18eba795c2f1949796a1f0
Calculate The file, The result save to CHECKSUM.SHA3-224
$ sha-checksum -a sha3-224 /usr/bin/python3 > CHECKSUM.SHA3-224
Check CHECKSUM file(checkmode)
$ sha-checksum -c CHECKSUM.SHA3-224
OK[SHA3-224]: /usr/bin/python3
Description¶
The software have calcmode, checkmode.
checkmode: Verify CHECKSUM file.
calcmode : Caluculate these files by hashdigest algorithm.
Hash digest style are opensslstyle, BSDstyle, GNUstyle.
1. openssl style, 2. BSDstyle, 3. GNUstyle
1. SHA2-256(/usr/bin/python3)= 863f...9556
2. SHA2-256 (/usr/bin/python3) = 863f...9556
3. 863f...9556 /usr/bin/python3
The software print hashdigest of all styles and check CHECKSUM file written by all styles.
Unicode ready(filepath, CHECKSUM file)
Nowadays, Filesystem record unicode file path name.
The software read it with unicode file path.
It also write CHECKSUM file by unicode.
Arguments¶
- -a, --algorithm [ARGORITHM]¶
Calculate with the algorithm.
algorithm is MD5, SHA1,
SHA224, SHA256, SHA384, SHA512,
SHA2-224, SHA2-256, SHA2-384, SHA2-512,
SHA3-224, SHA3-256, SHA3-384, SHA3-512,
Enable : calcmode, checkmode(GNUstyle)
Disable: checkmode(opensslstyle, BSDstyle)
- --stdin¶
The file paths input throuth the pipe from stdin.
Calc mode only.
- --style [ openssl | BSD | GNU ]¶
Output by the style. if --check option, Load by the style.
default is openssl style.
openssl: openssl style, openssl dgst command
e.g. MD5(/usr/bin/python3)= b804370957619edc6510439fed2b35b0
BSD: BSD style, shasum --tag, sha1~sha512 command on FreeBSD
e.g. MD5(/usr/bin/python3)= b804370957619edc6510439fed2b35b0
GNU: GNU style, shasum, sha1sum~sha512sum GNU edition.
e.g. f1768a9ca3017fe929fb463f2fd3c741b1394340 /usr/bin/python3
- --version: show version print.¶
Examples¶
Example 1: Make SHA3-512 Hash Digest of the file. openssl style(default)
$ sha-checksum -a sha3-512 /usr/bin/python3
SHA3-512(/usr/bin/python3)= e0200c209b40469f562262a9547106c600f32df3f59405d432877741e1c9c1afe7dd49329885b6412e6ffa01ae4ffddd6b1d3931a9c6332357236a18ef04933b
Example 2: Make SHA1 Hash Digest of the file. GNUstyle.
$ sha-checksum -a sha1 --style gnu /usr/bin/python3
f1768a9ca3017fe929fb463f2fd3c741b1394340 /usr/bin/python3
Example 3: Make SHA1 Hash Digest of python files on current directory. BSDstyle
$ sha-checksum -a sha1 --style bsd *.py
SHA2-224 (get-pip.py) = 7f4dae3fe12ddc483c1e9d543c9481531c89078837e2ba2d99680c74
.
.
Example 4: Make SHA3-224 Hash Digest of files on current directory recursively. Openssl style.
$ find . -type f | sha-checksum -a sha3-224 --stdin
SHA3-224(./python3)= a929ab975d76109f41b53b148f196348bd18eba795c2f1949796a1f0
.
.
Example 5: Check files on CHECKSUM file. openssl or BSD style.
$ sha-checksum --check CHECKSUM.SHA2-256
Example 6: Check files on CHECKSUM file. GNU style.
Gnu style Checksum file do not have hash digest algorithm information.
$ sha-checksum --style GNU --check CHECKSUM.SHA2-256
Bugs¶
Please report bugs to the e-mail: <voice[AT Mark]miketurkey.com>
License¶
GPLv3 LICENSE
2023 Copyright Mike Turkey
ABSOLUTELY NO WARRANTY
This software is licensed under the terms of the GNU General Public
License, version 3 (GPLv3), with an additional clause prohibiting the
use of this software for machine learning purposes.
Please refer to the LICENSE file for the complete license text and
additional terms.
See also
GPL-3 Licence, https://www.gnu.org/licenses/gpl-3.0.html.en
Mike Turkey.com, https://miketurkey.com