Python Package Link: 
A simple SHA-2 implementation in python which gives hash for string or a file. Suported hashing algorithms: SHA56, SHA512
CLI Tool Usage
- Example
python hashed/cli.py -s "Hello World!!" --sha256
Hash: 096c0a72c31f9a2d65126d8e8a401a2ab2f2e21d0a282a6ffe6642bbef65ffd9
- For help
usage: Hashing Library [-h] [--sha256] [--sha512] [-s STRING] [-f FILE] [-fb BINARY_FILE] [-t] [-p] [-b]
Provides secured hashes for given data
options:
-h, --help show this help message and exit
--sha256 Generates SHA-256 for given input (default: False)
--sha512 Generates SHA-512 for given input (default: False)
-s STRING, --string STRING
String to be hashed (default: None)
-f FILE, --file FILE File to be hashed (default: None)
-fb BINARY_FILE, --binary_file BINARY_FILE
Binary file to be hashed (default: None)
-t, --test Test accuracy of algorithm (default: False)
-p, --perf Log performance of the algorithm (default: False)
-b, --bits Returns size of hashed message in bytes (default: False)
Currently supported hashes [SHA256, SHA512]
Package Usage
from hashed import HashLib
h = HashLib('sha256').hasher_class()
h.hex_digest("Hello World")
Code Coverage and UTs
- Run UT
pytest
- Generate Coverage
coverage run -m pytest test
coverage html
Functions Supported
- hex_digest
- file_digest
- digest
- hashed_bits
- digest_size
For Algo refer: SHA-256 Wiki
For more refer:
Metadata
Release files for hashed 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hashed-2.2.0.tar.gz | 9.2 kB | Without provenance | Details for hashed-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hashed-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for hashed-2.2.0-py3-none-any.whl |
Total release size: 21.0 kB
Release files / hashed-2.2.0.tar.gz
| Download URL | hashed-2.2.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ed658e0db819e40b69b71e29375ef6e48afb6d3c11b3789aba42cd2db22c313
|
|
BLAKE2b-256 checksum How to use checksums |
26f8f70234726bd16c03039490e90708ccb84ad7bea97976e21210cf29b131f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / hashed-2.2.0-py3-none-any.whl
| Download URL | hashed-2.2.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8797f46838f000b29c783c8a0dcaf2a2f047aeea4d7ce413e8c0acd39b5e62d9
|
|
BLAKE2b-256 checksum How to use checksums |
e85a36ce538880c25ab831fe451d9fb19800ca386f57d23b3cfaec9b7d0d4a7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for hashed 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.