Command Line Tool

multihash ships with a minimal CLI tool.

$ multihash --help
usage: multihash [-h] [-c CHUNKSIZE] [-a ALGOS] filepaths [filepaths ...]

Compute multiple hashes.

positional arguments:
  filepaths             Filepaths to hash.

optional arguments:
  -h, --help            show this help message and exit
  -c CHUNKSIZE, --chunksize CHUNKSIZE
                        How much (maximum) of the file to read into RAM at
                        once.
  -a ALGOS, --algos ALGOS
                        The algorithm to use to hash the target(s).
                        Repeatable.

Example

$ multihash -a md5 -a sha256 cli.rst index.rst
{
  "cli.rst": {
    "sha256": "779243207066fb9a277e2acd5f2fbf36c499405e3e5049a2639de1f57f84cf6c",
    "md5": "b6e262ba7837cfae88e163f2b7508a44"
  },
  "index.rst": {
    "sha256": "490969b035e51556d8fbc68831976b41ba95376f80254cf315ea1ad08989ea95",
    "md5": "f68d1f9f8241289e8499e14653f7c9dc"
  }
}