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.2.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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sha0_py-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 fab4a3172efe32dfb37abc97bb8611d0e0c861d146d6764dc004516cf77b155a
MD5 0b3182bcdc14611d18a68f5a53222d08
BLAKE2b-256 d65d1adc0db119499d8839b6c1ff43612dc3f2e5a92749edb6f5a46aba7b1184

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sha0_py-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4dd641d9c9b609b39ba757682939d83ca2fa238db38a9d6942595d1a751480dc
MD5 7bd8045546e140f11a73c00836a9b129
BLAKE2b-256 04554ff28450f3130477add8fa42f26d24510d107bbe4f139c22569ca3449c78

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