sha - Man Page
file hashing utility
Synopsis
- sha
[-12345Vh] [file ...]
Description
sha is a simple program that hashes files. It uses the National Institute of Standards and Technology's Secure Hash Algorithm. It can use SHA-1, SHA-256, SHA-384, or SHA-512, which generate respectively, hashes of 160, 256, 384, or 512 bits. sha can be used in scripts to do, for example, file integrity checking.
Options
- -1
Use SHA-1, which produces a 160-bit hash (40 hex digits).
- -2
Use SHA-256, which produces a 256-bit hash (64 hex digits).
- -3
Use SHA-384, which produces a 384-bit hash (96 hex digits).
- -5
Use SHA-512, which produces a 512-bit hash (128 hex digits).
- -V
Display version information.
- -h
Display help summary.
- file ...
One or more files to hash. If no files are given, stdin is hashed.
If neither -1, -2, -3, or -5 are given, then SHA-1 is used. (But see note about SHA_DEFAULT below.)
Environment
- SHA_DEFAULT
The default hash algorithm to use. “1” denotes SHA-1, “2” denotes SHA-256, “3” denotes SHA-384, and “5” denotes SHA-512. Only the first character is significant. If not defined, SHA-1 is the default.