A string class enhancement
Project description
unhashlib is a Python string class enhancement (a mixin).
Installation
The easiest way to install the package is via pip:
$ pip install unhashlib
Usage
Checking against a hash to the basic string class
The hash can be automatically recognized.
from unhashlib import unhashlib
s = unhashlib('the tragicall historye of romeus and juliet')
len(s)
> 43
s.title()
> 'The Tragicall Historye Of Romeus And Juliet'
from hashlib import sha256
print(s.get_algorithm(sha256(s.encode('utf-8')).hexdigest()))
> 'sha256'
print(s.check(sha256(s.encode('utf-8')).hexdigest()))
> True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unhashlib-0.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for unhashlib-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4faa2a3f836bf634d27cef1fec0761ab0194a8bd919570ea2c3fe183c1c7e457 |
|
MD5 | 5c0e9a18ae5c37ddf71dc80983e7823b |
|
BLAKE2b-256 | eeb1eb1742b248309d403fdee3c801c14d47add148edfbaee4885d436a35d84b |