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, 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()
Links
Bugs
Please report bugs, issues, feature requests, etc. on GitHub.
License
Licensed under the terms of the Apache License, Version 2.0.
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
Built Distribution
File details
Details for the file rehash-0.1.0.tar.gz
.
File metadata
- Download URL: rehash-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60eb38125b762ea2adc26ebde89bfe21dad9ce0f6e74c8ee7ebf69f4c35df108 |
|
MD5 | d56188c95f09d6e0a2500e3a6f4bb2bc |
|
BLAKE2b-256 | 5913c3325578759f32e6028882592f64810104a751e698478a9159cc05759e4d |
File details
Details for the file rehash-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: rehash-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4067df9d2205b71ca216713eeef6568e6e8734cbd52a8a53c021a4b49a3f948 |
|
MD5 | 22163651af566e1de218339a69dfb38c |
|
BLAKE2b-256 | 3509a888de0134b3efa97b938cd300c5e7c568634d8a262fe0e46ed2a9945fdc |