The Secure Hashing Algorithm (SHA-1) is an algorithm for a generating
cryptographically secure one-way ▲hash (also
referred to as a ▲message digest). The algorithm was
defined by the United Stated Government in
FIPS PUB 180-1
,
which was published in 1995. The text was also reproduced in
RFC 3174, which includes source code for a reference implementation.
The function accepts an input message
of any length from 0 to 2^64 octets and produces a 160-bit one-way hash.
The Secure Hashing Algorithm family was further expanded upon in August 2002
with the publication of
FIPS PUB 180-2
,
which defines SHA-1, SHA-256, SHA-384, and SHA-512. The new additions to
this suite produce message digest of various sizes, with the number of
bits following the acronym SHA (i.e., 256 bits, 384 bits, and 512 bits).