Pure Python implementations of common hashing algorithms.
pip install purehash
Usage is similar to that of hashlib
, for example:
import purehash
m = purehash.md5(b"The quick brown fox ")
m.update(b"jumps over the lazy dog.")
m.digest() # b"\xe4\xd9\t\xc2\x90\xd0\xfb\x1c\xa0h\xff\xad\xdf"\xcb\xd0"
m.hexdigest() # "e4d909c290d0fb1ca068ffaddf22cbd0"
- MD5 (
md5
) - SHA-1 (
sha1
) - SHA-256 (
sha256
) - SHA-512 (
sha512
)