Skip to main content

Resumable hashlib: a picklable interface to CPython's OpenSSL-based hashlib standard library

Project description

Rehash is a resumable interface to the OpenSSL-based hashers in the CPython hashlib standard library. Rehash provides hashers that can be pickled, persisted and reconstituted from their repr(), and otherwise serialized. The rest of the Rehash API is identical to hashlib.

Rehash hashers can be used to checkpoint and restore progress when hashing large byte streams:

import pickle, rehash
hasher = rehash.sha256(b"foo")
state = pickle.dumps(hasher)

hasher2 = pickle.loads(state)
hasher2.update(b"bar")

assert hasher2.hexdigest() == rehash.sha256(b"foobar").hexdigest()

License

Licensed under the terms of the Apache License, Version 2.0.

https://travis-ci.org/kislyuk/rehash.png https://codecov.io/github/kislyuk/rehash/coverage.svg?branch=master https://img.shields.io/pypi/v/rehash.svg https://img.shields.io/pypi/l/rehash.svg https://readthedocs.org/projects/rehash/badge/?version=latest

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

rehash-0.2.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

rehash-0.2.1-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: rehash-0.2.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rehash-0.2.1.tar.gz
Algorithm Hash digest
SHA256 444d7926bf400887859673a9c2fa5a3951272247c4ed782e924de36d6c2b109c
MD5 db157ee82503865b132c365b09fb2b50
BLAKE2b-256 9a713cc781668fcdc869022b63156fe6d1e62acbe9d27df6e3d0c7501bf5daaa

See more details on using hashes here.

File details

Details for the file rehash-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rehash-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5406e26d7f60d9902774cd507009811c9588fa9a8b1c2fd45a223c161a6270e6
MD5 b5155dae1b1cf7487e057f44d9ded320
BLAKE2b-256 b1f9f68d8d1a3e6ac65817cf9195cc4a967bc0a0edf95385ef32eaeea92293bd

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