跳转到主要内容

一个速度快、可移植的哈希函数,具有经过验证的统计保证

项目描述

SeaHash

CI PyPI PyPI - Python Version PyPI - Wheel PyPI - Status PyPI - License

Python绑定到seahash - 一个速度快、可移植的哈希函数,具有经过验证的统计保证。

安装

pip install seahash

大多数平台都应提供轮子。如果您需要未提供的轮子,请提出问题

从源代码编译需要Rust工具链。

使用方法

哈希可以有两种方式完成

原语函数

import seahash

# Plain hash
seahash.hash(b"123")

# Hash with custom seeds
seahash.hash_seeded(b"123", 4, 5, 6, 7)

两种方法都返回一个int

hashlib兼容类

为了方便,提供了一个hashlib兼容类

import seahash

s = seahash.SeaHash()

s.update(b"123")

s.digest()
s.hexdigest()

可以使用intdigest获取底层的int摘要。

项目详情


下载文件

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

源代码分发

seahash-0.2.0.tar.gz (5.1 kB 查看哈希值)

上传时间 源代码

构建分发

seahash-0.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传时间 CPython 3.11 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp310-none-win_amd64.whl (129.3 kB 查看哈希值)

上传时间 CPython 3.10 Windows x86-64

seahash-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传时间 CPython 3.10 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.1 kB 查看哈希值)

上传时间 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

seahash-0.2.0-cp39-none-win_amd64.whl (129.6 kB 查看哈希值)

上传时间 CPython 3.9 Windows x86-64

seahash-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传时间 CPython 3.9 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (470.3 kB 查看哈希值)

上传时间 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

seahash-0.2.0-cp38-none-win_amd64.whl (129.1 kB 查看哈希值)

上传于 CPython 3.8 Windows x86-64

seahash-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传于 CPython 3.8 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.7 kB 查看哈希值)

上传于 CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

seahash-0.2.0-cp37-none-win_amd64.whl (129.1 kB 查看哈希值)

上传于 CPython 3.7 Windows x86-64

seahash-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB 查看哈希值)

上传于 CPython 3.7m manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.8 kB 查看哈希值)

上传于 CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

由以下组织支持

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