1SHASUM(1) User Contributed Perl Documentation SHASUM(1)
2
3
4
6 shasum - Print or Check SHA Checksums
7
9 Usage: shasum [OPTION]... [FILE]...
10 Print or check SHA checksums.
11 With no FILE, or when FILE is -, read standard input.
12
13 -a, --algorithm 1 (default), 224, 256, 384, 512, 512224, 512256
14 -b, --binary read in binary mode
15 -c, --check read SHA sums from the FILEs and check them
16 --tag create a BSD-style checksum
17 -t, --text read in text mode (default)
18 -U, --UNIVERSAL read in Universal Newlines mode
19 produces same digest on Windows/Unix/Mac
20 -0, --01 read in BITS mode
21 ASCII '0' interpreted as 0-bit,
22 ASCII '1' interpreted as 1-bit,
23 all other characters ignored
24
25 The following five options are useful only when verifying checksums:
26 --ignore-missing don't fail or report status for missing files
27 -q, --quiet don't print OK for each successfully verified file
28 -s, --status don't output anything, status code shows success
29 --strict exit non-zero for improperly formatted checksum lines
30 -w, --warn warn about improperly formatted checksum lines
31
32 -h, --help display this help and exit
33 -v, --version output version information and exit
34
35 When verifying SHA-512/224 or SHA-512/256 checksums, indicate the
36 algorithm explicitly using the -a option, e.g.
37
38 shasum -a 512224 -c checksumfile
39
40 The sums are computed as described in FIPS PUB 180-4. When checking,
41 the input should be a former output of this program. The default
42 mode is to print a line with checksum, a character indicating type
43 (`*' for binary, ` ' for text, `U' for UNIVERSAL, `^' for BITS),
44 and name for each FILE. The line starts with a `\' character if the
45 FILE name contains either newlines or backslashes, which are then
46 replaced by the two-character sequences `\n' and `\\' respectively.
47
48 Report shasum bugs to mshelor@cpan.org
49
51 Running shasum is often the quickest way to compute SHA message
52 digests. The user simply feeds data to the script through files or
53 standard input, and then collects the results from standard output.
54
55 The following command shows how to compute digests for typical inputs
56 such as the NIST test vector "abc":
57
58 perl -e "print qq(abc)" | shasum
59
60 Or, if you want to use SHA-256 instead of the default SHA-1, simply
61 say:
62
63 perl -e "print qq(abc)" | shasum -a 256
64
65 Since shasum mimics the behavior of the combined GNU sha1sum,
66 sha224sum, sha256sum, sha384sum, and sha512sum programs, you can
67 install this script as a convenient drop-in replacement.
68
69 Unlike the GNU programs, shasum encompasses the full SHA standard by
70 allowing partial-byte inputs. This is accomplished through the BITS
71 option (-0). The following example computes the SHA-224 digest of the
72 7-bit message 0001100:
73
74 perl -e "print qq(0001100)" | shasum -0 -a 224
75
77 Copyright (C) 2003-2018 Mark Shelor <mshelor@cpan.org>.
78
80 shasum is implemented using the Perl module Digest::SHA.
81
82
83
84perl v5.26.3 2018-04-20 SHASUM(1)