https://github.com/nellogan/hasher
Hash files at the command line with MD5, SHA1, or SHA2.
https://github.com/nellogan/hasher
hash md5 sha1 sha2 sha384 sha512 sha512-224 sha512-256 sha512-t
Last synced: 3 months ago
JSON representation
Hash files at the command line with MD5, SHA1, or SHA2.
- Host: GitHub
- URL: https://github.com/nellogan/hasher
- Owner: nellogan
- License: mit
- Created: 2022-05-05T12:27:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-05T12:37:12.000Z (over 3 years ago)
- Last Synced: 2025-01-21T08:12:56.415Z (9 months ago)
- Topics: hash, md5, sha1, sha2, sha384, sha512, sha512-224, sha512-256, sha512-t
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
Python implementation of MD5, SHA1, and all SHA2 algorithms (including SHA512/t). SHA3 may be added at a later date.
This package differs from hashlib in that SHA512/t is available and the user can also hash files by passing the file path directly. Includes a command line interface and unit tests.### Command line example:
`python -m hasher SHA512/256 "\..\file_path" False`SHA512/256 is SHA512/t with t set to 256 bits. True/False designates whether "\..\filepath" is a file or a string.
Returns a hexadecimal string.### Library example:
`import hasher``print(hasher.sha512_t("test string",string=True,t=256).hexdigest()))`
`print(hasher.sha384("test string",string=True).hexdigest()))`
### Test example:
change directory to \\..\hasher`python tests.py`
For SHA512/t, t is generally set to 256 or 224 bits. User may set t
to 1 <= value <= 512 (NIST FIPS 180-4 specifies to not set t to 384 bits).