Skip to main content

Command-line hash utility

Project description

Gethash

PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - License pre-commit Code style: black Ruff

Gethash is a command-line hash utility.

Installation

Install from PyPI:

$ pip install gethash

or if you need legacy hash algorithms:

$ pip install "gethash[all]"

Usage

After installation, 10 commands are available:

  • crc32
  • md5
  • sha1
  • sha256
  • sha512
  • sha3-256
  • sha3-512
  • blake2b
  • blake2s
  • gethash

Show command-line usage:

$ gethash --help
Usage: gethash [OPTIONS] COMMAND [ARGS]...

  Generate or check various hash values.

Options:
  -V, --version  Show the version and exit.
  -h, --help     Show this message and exit.

Commands:
  blake2b     Generate or check BLAKE2b.
  blake2s     Generate or check BLAKE2s.
  crc32       Generate or check CRC32.
  md2         Generate or check MD2.
  md4         Generate or check MD4.
  md5         Generate or check MD5.
  md5-sha1    Generate or check MD5-SHA1.
  mdc2        Generate or check MDC2.
  ripemd160   Generate or check RIPEMD160.
  sha1        Generate or check SHA1.
  sha3-224    Generate or check SHA3-224.
  sha3-256    Generate or check SHA3-256.
  sha3-384    Generate or check SHA3-384.
  sha3-512    Generate or check SHA3-512.
  sha224      Generate or check SHA224.
  sha256      Generate or check SHA256.
  sha384      Generate or check SHA384.
  sha512      Generate or check SHA512.
  sha512-224  Generate or check SHA512-224.
  sha512-256  Generate or check SHA512-256.
  sm3         Generate or check SM3.
  whirlpool   Generate or check WHIRLPOOL.

Generate hash values

$ ls -l
total 296
-rw-r--r-- 1 User 197610  68074 Jun 27 10:43 001.zip
-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip
-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip

$ sha1 -s *.zip
7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip
0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip
10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip

$ ls -l
total 299
-rw-r--r-- 1 User 197610  68074 Jun 27 10:43 001.zip
-rw-r--r-- 1 User 197610     51 Jun 27 10:44 001.zip.sha1
-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip
-rw-r--r-- 1 User 197610     51 Jun 27 10:44 002.zip.sha1
-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip
-rw-r--r-- 1 User 197610     51 Jun 27 10:44 003.zip.sha1

Check hash values

$ cat *.sha1
7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip
0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip
10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip

$ sha1 -c *.sha1
[SUCCESS] 001.zip
[SUCCESS] 002.zip
[SUCCESS] 003.zip

Project Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gethash-6.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

gethash-6.0-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file gethash-6.0.tar.gz.

File metadata

  • Download URL: gethash-6.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.1

File hashes

Hashes for gethash-6.0.tar.gz
Algorithm Hash digest
SHA256 38d6b9bba969473ef5410965b02c3f0110c4d258ee3ac82f36fd7e3e0d183091
MD5 79bde3229e30d75c17fb01f92345d646
BLAKE2b-256 77a1b498be008f4a885f396c210c54c47ac62317856e45df32b75ab373fa493f

See more details on using hashes here.

File details

Details for the file gethash-6.0-py3-none-any.whl.

File metadata

  • Download URL: gethash-6.0-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.1

File hashes

Hashes for gethash-6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58ff7853af25b728f31385c8cb73a6eebd6d7d5e28632cc20ec83d3872f1df9c
MD5 032ddae2c73bace4906a92f102ff5eda
BLAKE2b-256 880e2dc18e569140b5fa8f8e61c1d1185ba0fd43197b203d2d144013865df5f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page