sha1 - calculate a message-digest fingerprint (checksum) for
sha1 [-p | -t | -x | -c [checklist ...] | -s string | file
sha1 takes as input a message of arbitrary length and produces as output
a 160-bit "fingerprint" or "message digest" of the input.
It is conjectured
that it is computationally infeasible to produce two
the same message digest, or to produce any message having a given
prespecified target message digest.
The SHA-1 algorithm is intended for digital signature applications, where
a large file must be "compressed" in a secure manner before
with a private (secret) key under a public-key cryptosystem such
The options are as follows:
-c [checklist ...]
Compares all checksums contained in the file
checklist with newly
computed checksums for the corresponding files.
of the digest used, the file name, and an OK or
FAILED for the
result of the comparison. This will validate any of
checksums (see cksum(1)). If no file is given,
stdin is used.
-p Echoes stdin to stdout and appends the SHA-1 sum to
Prints a checksum of the given string.
-t Runs a built-in time trial.
-x Runs a built-in test script.
The SHA-1 sum of each file listed on the command line is
the options are processed.
The sha1 command is shorthand for
cksum -a sha1
The cksum(1) command can also be used to compute digests
from the SHA-2
family: sha256, sha384 and sha512.
cksum(1), md5(1), rmd160(1)
J. Burrows, The Secure Hash Standard, FIPS PUB 180-1.
D. Eastlake and P. Jones, US Secure Hash Algorithm 1, RFC
OpenBSD 3.6 April 30, 2004
[ Back ]