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()
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rehash-0.2.0.tar.gz.
File metadata
- Download URL: rehash-0.2.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
141376cd7f2de3029ce1daa341e40d9fb87795e57709322f0b4343376eeade5d
|
|
| MD5 |
5ffd3e4a950aa064407ea0bde4fdc94e
|
|
| BLAKE2b-256 |
1ca9ffa2819283b809c230372e8fd2ec3f5bad4a9017b24fc2b6ae43820bd7b3
|
File details
Details for the file rehash-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: rehash-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b0cc7b1c83c61d66f6bac5a1db35f662bd45b98c3c642090155bc636f830d7
|
|
| MD5 |
b7b53a593a201dee323f7e62d8a78b6f
|
|
| BLAKE2b-256 |
00cd1a3f92ea57b8ac032d442eb0466e18527c2e8f2cd0242190f46f50198b73
|