https://github.com/cloudtools/sha256
This is a SHA-256 implementation that allows for setting and getting the mid-state information.
https://github.com/cloudtools/sha256
Last synced: 12 days ago
JSON representation
This is a SHA-256 implementation that allows for setting and getting the mid-state information.
- Host: GitHub
- URL: https://github.com/cloudtools/sha256
- Owner: cloudtools
- Created: 2015-09-04T17:08:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-01-04T18:10:23.000Z (about 2 years ago)
- Last Synced: 2025-11-27T20:06:37.297Z (2 months ago)
- Language: Cython
- Size: 16.6 KB
- Stars: 10
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
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 cythonize step via::
python3 -m pip install --upgrade build
python3 -m build
Testing
=======
To run the unit test suite:
python3 -m pip install --upgrade nox
python3 -m nox
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.
.. _Cython: http://cython.org
.. _`MIT license`: http://opensource.org/licenses/MIT