hashfunctions package


The hashfunctions package provides the tools sha1, sha256, and crc32. These tools compute the SHA-1 cryptographic hash function, the SHA-256 cryptographic hash function, and the CRC-32 checksum, respectively. They operate on character streams of any length. sha1 computes a 20-byte hash, sha256 computes a 32-byte hash, and crc32 computes a 4-byte checksum.

sha1 and sha256 aim to conform to the U.S. Government's Secure Hash Standard, FIPS PUB 180-2, although this has not been officially certified. Unlike the standard, these programs can (in principle) handle input streams that are longer than 2^64 bits. You can run "make check" to test the implementations against FIPS and SHAVP test suites.

For each filename argument, the tools print one line containing the hash value and the filename in the following format:

  347b40d5e85365fa11e2c1cf6cb8c80c288c39fb filename
If no filename is given on the command line, the input is read from stdin.

Downloading and Installing

The current version of this package can be downloaded here:
Source distribution: hashfunctions-0.3.tar.gz
Precompiled distributions: Windows hashfunctions-0.3.win32.zip

The SHA-1 checksum of this package is:

  2c558c0bcb969791d81ffb4ce98df21b11b97125 hashfunctions-0.3.tar.gz

The package is configured, built, and installed by the usual commands: "./configure", "make", "make install". For details, see the file INSTALL.


    sha1 [options] [file...]
    sha256 [options] [file...]
    crc32 [options] [file...]


        -h, --help         print this help message and exit
        -v, --version      print version info and exit
        -l, --license      print license info and exit
        -r, --recursive    traverse subdirectories recursively
        -q, --quiet        suppress warnings
For detailed usage information, see the man page.

OCaml Bindings

The package provides bindings to SHA-256 for the Objective Caml language (http://caml.inria.fr/ocaml/) in the caml/ subdirectory. See caml/README.




Copyright (C) 2000-2007 Peter Selinger.


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

Back to Homepage: [home]

Peter Selinger / selinger@users.sourceforge.net / PGP key
Updated January 17, 2007