Provides secured hashes for given data
Project description
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:
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
hashed-2.2.0.tar.gz
(9.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hashed-2.2.0-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file hashed-2.2.0.tar.gz.
File metadata
- Download URL: hashed-2.2.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ed658e0db819e40b69b71e29375ef6e48afb6d3c11b3789aba42cd2db22c313
|
|
| MD5 |
5564d14634567e56b730621c392b7e98
|
|
| BLAKE2b-256 |
26f8f70234726bd16c03039490e90708ccb84ad7bea97976e21210cf29b131f8
|
File details
Details for the file hashed-2.2.0-py3-none-any.whl.
File metadata
- Download URL: hashed-2.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8797f46838f000b29c783c8a0dcaf2a2f047aeea4d7ce413e8c0acd39b5e62d9
|
|
| MD5 |
560e183e1b6eeed5a0d2dd09cbd88be5
|
|
| BLAKE2b-256 |
e85a36ce538880c25ab831fe451d9fb19800ca386f57d23b3cfaec9b7d0d4a7f
|