Skip to main content

Serializable hash objects

Project description

Hashstate

This is a Python C extension module that forks the hashlib implementation from CPython itself to add support for a single feature: the ability to serialize and deserialize hash objects so that the hash objects do not have to persist in memory for the whole duration of the hash computation.

Usage

pip install hashstate
import hashstate

# Contains all the same constructors as hashlib
hash1 = hashstate.sha512()
hash1.update('...')
s = hash1.serialize()  # gives back bytes object

hash2 = hashstate.sha512()
hash2.deserialize(s)
assert hash1.digest() == hash2.digest()

Developers

Build the package (requires openssl on your build paths):

python setup.py sdist bdist_wheel

If building a MacOS wheel, also run:

delocate-wheel -v ./dist/*-macosx_*.whl

Build the linux bdist_wheels (64-bit only at the moment):

docker build -t manylinux-hashstate .
docker run --rm -v $(pwd)/dist:/dist manylinux-hashstate

Upload to pypi

twine upload dist/*

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

hashstate-0.2.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distributions

hashstate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m

hashstate-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

hashstate-0.2.1-cp35-cp35m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.5m

hashstate-0.2.1-cp34-cp34m-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.4m

File details

Details for the file hashstate-0.2.1.tar.gz.

File metadata

  • Download URL: hashstate-0.2.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for hashstate-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cf6bf57487d00975fa60d6c3853b79052a35143b3d434c0e5539ecc9a13b28e8
MD5 5b428d91bf88df56aa00f7e5ef213fb7
BLAKE2b-256 102a63951a821f59d2a8856646adb41fc6bea5111218e326145dc388531ac0aa

See more details on using hashes here.

Provenance

File details

Details for the file hashstate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: hashstate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for hashstate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 29218c434dd0a7ba558150dd96ae6b1149b5f2960b835e8e9bc9c9eebd4bf733
MD5 d2dd3cf7a1ed713eb90780b1a5f078e3
BLAKE2b-256 bd9a035059bb0600faf1d83ea9a0f4871062e1008275dd42827091a400af8a62

See more details on using hashes here.

Provenance

File details

Details for the file hashstate-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: hashstate-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for hashstate-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3370c8a053fedce28c7612fa6ed3184df17f7c05b8dde0112765c3a628015d6b
MD5 e8c438f6e4711eb2b75bc4a539f984a0
BLAKE2b-256 55ee70e6ebcbdf7a2be41ff402bc7e21db3480309b79063d8c77efc742605ed1

See more details on using hashes here.

Provenance

File details

Details for the file hashstate-0.2.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: hashstate-0.2.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for hashstate-0.2.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d8644b54a73370bc85c23af3ae4887ca4f46d4e1cd8b8515a13c6303dad45a09
MD5 44e585547efea1ef166c1836a0fbfe6a
BLAKE2b-256 7e8ff9f567665bdae9325470ad792e1a52e9c9c639436b99bbb8e0a4cf3fbe5a

See more details on using hashes here.

Provenance

File details

Details for the file hashstate-0.2.1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: hashstate-0.2.1-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for hashstate-0.2.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b0e02669e354582877e62f8d564b5bf54d032ec581c50f24c8a16eed40cb4ae4
MD5 0cd3356a518785ee78dc0af7d777a827
BLAKE2b-256 ce01d11d7d9fb3dd09a0dc4c08cf18aef44a671f058d8e08b191aa0f0776e4b9

See more details on using hashes here.

Provenance

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