跳转到主要内容

可序列化哈希对象

项目描述

Hashstate

这是一个Python C扩展模块,它从CPython本身分叉了hashlib实现,以添加单个功能:能够序列化和反序列化哈希对象,以便哈希对象在整个哈希计算过程中无需持续存在于内存中。

用法

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()

开发者

构建包(构建路径需要openssl)

python setup.py sdist bdist_wheel

如果构建MacOS wheel,还需要运行

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

构建linux bdist_wheels(目前仅限于64位)

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

上传到PyPI

twine upload dist/*

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分发

hashstate-0.2.1.tar.gz (7.4 kB 查看哈希值)

上传时间:

构建分发

hashstate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB 查看哈希值)

上传于 CPython 3.6m

hashstate-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl (1.1 MB 查看哈希值)

上传于 CPython 3.6m macOS 10.13+ x86-64

hashstate-0.2.1-cp35-cp35m-manylinux1_x86_64.whl (1.3 MB 查看哈希值)

上传于 CPython 3.5m

hashstate-0.2.1-cp34-cp34m-manylinux1_x86_64.whl (1.3 MB 查看哈希值)

上传于 CPython 3.4m

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面