Skip to main content

A package implementing the broken SHA-0 hash algorithm.

Project description

sha0

This is a purely Python implementation of the broken SHA-0 hash algorithm. The usage is exactly the same as the hashes provided in the Python builtin hashlib library.

Credit

This repository is based off of the C implementation of SHA-0 in this repo by @johndoe31415.

Installation

pip install sha0-py 

Usage

# SHA-0 of b"Nobody inspects the spammish repetition"
>>> import sha0
>>> m = sha0.sha0(b"Nobody inspects")
>>> m.update(b" the spammish repetition")
>>> m.digest()
b'\xe2\xb0\xa8`\x9bG\xc5\x8e]\x98L\x9c\xcf\xe6\x9f\x9beK\x03+'
>>> m.hexdigest()
b'e2b0a8609b47c58e5d984c9ccfe69f9b654b032b'

# More condensed
>>> import sha0
>>> m = sha0.sha0(b"Nobody inspects the spammish repetition")
>>> m.hexdigest()
b'e2b0a8609b47c58e5d984c9ccfe69f9b654b032b'

License

MIT License

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

sha0_py-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sha0_py-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file sha0_py-0.0.1.tar.gz.

File metadata

  • Download URL: sha0_py-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sha0_py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2b60672995add0ecdefe94b16ac96c8f7db25a6641604dafc9e7544aa42d32ec
MD5 6b59a3c78efd727b9beb9f89cef7527e
BLAKE2b-256 4d7f5c4c82147c57a4dbb9efbf1220137daf58711007f98dcce66b6879c4b9c6

See more details on using hashes here.

File details

Details for the file sha0_py-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sha0_py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sha0_py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af1a9dc935e65f2bae8066b82b3b6b44c3dd2b25840f0f7341d19143989b3115
MD5 f7086b24b7586d36f91d7c1565993195
BLAKE2b-256 10b5592d8b8502c724d438bf85f2ce9c3b4c3a77ec19e46a1f863cdbd04f5ff6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page