Manual Page Search Parameters
md5, sha1, sha256, sha512(1) calculate a message digest (checksum) for a file
md5, MD5Init, MD5Data, MD5End, MD5File, MD5FileChunk, MD5Final, MD5Pad, MD5Transform, MD5Update(3) calculate the RSA Data Security, Inc., MD5 message digest
md5, MD5Init, MD5Transform(9) message digest routines

MD5(1) General Commands Manual MD5(1)


md5, sha1, sha256, sha512calculate a message digest (checksum) for a file


md5 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]

sha1 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]

sha256 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]

sha512 [-bcpqrtx] [-C checklist] [-h hashfile] [-s string] [file ...]


These utilities take as input a message of arbitrary length and produce as output a message digest (checksum) of the input.
Two messages having the same message digest (a collision) have been produced for MD5 and for SHA-1, so their use is deprecated.
The options for use with each command are as follows:
Output checksums in base64 notation, not hexadecimal.
-C checklist
Compare the checksum of each file against the checksums in the checklist. Any specified file that is not listed in the checklist will generate an error.
If this option is specified, the file options become checklists. Each checklist should contain hash results in the normal format, which will be verified against the specified paths. Output consists of the digest used, the file name, and an OK, FAILED, or MISSING for the result of the comparison. This will validate any of the supported checksums (see cksum(1)). If no file is given, stdin is used.
-h hashfile
Place the checksum into hashfile instead of stdout.
Echoes stdin to stdout and appends the checksum to stdout.
Only print the checksum (quiet mode) or if used in conjunction with the -c flag, only print the failed cases.
Reverse the format of the hash algorithm output, making it match the output format used by cksum(1).
-s string
Prints a checksum of the given string.
Runs a built-in time trial. Specifying -t multiple times results in the number of rounds being multiplied by 10 for each additional flag.
Runs a built-in test script.


These utilities exit 0 on success, and >0 if an error occurs.




R. Rivest, The MD5 Message-Digest Algorithm, RFC 1321, April 1992. J. Burrows, The Secure Hash Standard, FIPS PUB 180-1.
D. Eastlake and P. Jones, US Secure Hash Algorithm 1 (SHA1), RFC 3174, September 2001. Secure Hash Standard, FIPS PUB 180-2.
February 23, 2017 OpenBSD-current