Skip to main content

sha256 library with midstate

Project description

This is a SHA-256 implementation that allows for setting and getting the mid-state information. This was needed to enable repeated hashing against a (potentially large) fixed prefix.

Performance

The original version of this was written in Python. While the Cython version will be much faster, this is not a highly optimized library and relies on the native C compiler for optimization.

Cythonize

This repository does not contain the generated C code from Cython. To recreate the C code run the cytnonize step via:

python3 -m pip install --upgrade build
python3 -m build

Authors

The original author was Thomas Dixon for a python version of this code. Sam Rushing added the midstate access and converted it to Cython. Nigel Drego added the context state setter/getter.

LICENSE

This is licensed under the MIT license based on the original license from Thomas Dixon.

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

sha256-1.0.tar.gz (83.8 kB view details)

Uploaded Source

File details

Details for the file sha256-1.0.tar.gz.

File metadata

  • Download URL: sha256-1.0.tar.gz
  • Upload date:
  • Size: 83.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sha256-1.0.tar.gz
Algorithm Hash digest
SHA256 9a3921b815c6c99e7fe3692d8b88fd44f8688d5b923b9f9fc60d93b645ce471a
MD5 ae959b7b18260e413b5e82d9767cc5e7
BLAKE2b-256 40303ee564cf8e7fd089b06d8d0622a651f72ec4963391956e0f5ce4beba8272

See more details on using hashes here.

Supported by

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