py-shasum

Synopsis

py-shasum [--help | -h] [--version | -v] [--algorithm | -a ALGORITHM] [--base64] [--binary | -b] [--bsd | -B] [--check | -c] [--checklist | -C CHECKLIST] [--checklist-allow-distinfo] [--follow-symlinks] [--mmap] [--no-mmap] [--recurse] [--reverse | -r] [--tag] [--text | -t] [FILE …]

Description

Print and check SHA checksums.

With no FILE of when FILE is -, read from stdin.

Options

--help, -h

Print a help message to stdout and exit.

--version, -v

Print the program’s version to stdout and exit.

--algorithm=ALGORITHM, -a ALGORITHM

1 (aka sha1), 2 (alias for sha256), 224, 256 (aka sha256), 384, 512 (aka sha512), 3 (alias for sha3-512), 3-224, 3-256, 3-384, 3-512, blake2b, blake2b-256, blake2s, blake2 (alias for blake2b), blake2-256 (alias for blake2b-256), md5.

The default is 1.

--base64

Output checksums in base64 notation, not hexadecimal (OpenBSD).

--binary, -b

Read files in binary mode (default).

Other modes are not supported!

--bsd, -B

Write BSD style output. This is also the default output format of openssl dgst.

--check, -c

Read digests from FILEs and check them.

If this option is specified, the FILE options become checklists. Each checklist should contain hash results in a supported 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.

If no file is given, stdin is used.

--checklist=CHECKLIST, -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.

--checklist-allow-distinfo

Allow FreeBSD distinfo formatted checklists: ignore SIZE and TIMESTAMP lines.

Also follow symlinks that resolve to directories. Only effective if --recurse is activated.

--mmap

Use mmap if available on the system.

The default depends on the size of the file that is handled.

--no-mmap

Don’t use mmap.

--recurse

Recurse into sub-directories while interpreting every FILE as a directory.

--reverse, -r

Explicitely select normal coreutils style output.

This is to be option compatible with BSD style commands and openssl dgst -r.

--tag

Alias for the --bsd option.

Also to be compatible with b2sum.

--text, -t

Read in text mode.

This is not implemented.

This option is there to be option compatible to GNU shasum.