Skip to main content

Collection of some hash functions implemented with torch/numpy/tensorflow

WORK IN PROGRESS!

Installation

pip install parahash

or clone this repo and run

pip install -U poetry
poetry install -E all

# To install to your current environment, do
# pip install .

Some dependencies are optional when installing because they are not required or you may need a custom-built version of torch/tensorflow/numpy. Make sure to install them if you need them.

MD5

import parahash
from bitarray import bitarray

device = "cpu"
# device = "cuda"

data = [b'hello', "world", bitarray('1101010101010101010101010101010101010101010101010101010101010101')]

for out in parahash.md5.md5(data, device=device):
    print(parahash.md5.hexdigest(out))

Current implementation with enough batch size can get 20 million hashes per second on a single RTX3090 GPU, 16 million hashes per second on a single RTX4070TiS GPU and 750K hashes per second on a single 7950x CPU.

Metadata

Release files for parahash 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parahash 0.1.0
File Size Uploaded Provenance Actions
parahash-0.1.0.tar.gz 4.7 kB Without provenance Details for parahash-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parahash 0.1.0
File Interpreter ABI Platform Actions
parahash-0.1.0-py3-none-any.whl Python 3 none any Details for parahash-0.1.0-py3-none-any.whl

Total release size: 9.2 kB

Release files / parahash-0.1.0.tar.gz

Download URL parahash-0.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fe18e214694b17c82c5b09fae5f0364dae6ffc705914ab04ff5151b7151dc8e8
BLAKE2b-256 checksum
How to use checksums
48192bbbd8bcfc0bc6a4d39e8050ba6b169ad5c6fbd30476dac8205c370534d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-35-generic

Release files / parahash-0.1.0-py3-none-any.whl

Download URL parahash-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4b4ad0197e80541fe1922c4f3855dca93c6b3e63843fc71af144f19cdb6f8d5
BLAKE2b-256 checksum
How to use checksums
f93cd54556bdc06862d77d16b29c18df4300e6dcc1d28fa4078ffb4ea8d9e528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-35-generic

Security for parahash 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page