Metadata-Version: 2.1
Name: gethash
Version: 4.6
Summary: Command-line hash utility
Home-page: https://github.com/xymy/gethash
Author: xymy
Author-email: thyfan@163.com
Maintainer: xymy
Maintainer-email: thyfan@163.com
License: MIT
Project-URL: Documentation, https://github.com/xymy/gethash
Project-URL: Issue Tracker, https://github.com/xymy/gethash/issues
Project-URL: Source Code, https://github.com/xymy/gethash
Keywords: cryptography,hash,utility
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Security
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click (>=7.1)
Requires-Dist: click-option-group (>=0.5)
Requires-Dist: importlib-metadata (>=3.6)
Requires-Dist: tqdm (>=4.53)
Requires-Dist: colorama (>=0.4) ; platform_system == "Windows"
Provides-Extra: all
Requires-Dist: pycryptodomex (>=3.10) ; extra == 'all'
Provides-Extra: dev
Requires-Dist: black (>=21.9b) ; extra == 'dev'
Requires-Dist: isort (>=5.9) ; extra == 'dev'
Requires-Dist: flake8 (>=3.9) ; extra == 'dev'
Requires-Dist: mypy (>=0.910) ; extra == 'dev'

# Gethash

Gethash is a command-line hash utility.

## Installation

```shell
$ pip install -U gethash
```

or (if you need legacy hash algorithms)

```shell
$ pip install -U "gethash[all]"
```

*Note: Gethash requires Python 3.7 and later.*

## Usage

After installation, 9 commands are available:

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

If you use `[all]`, 3 additional commands are available:

- md2
- md4
- ripemd160

### Generate hash values

```shell
$ 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

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

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


