Skip to main content

No project description provided

Project description

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.

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

parahash-0.1.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

parahash-0.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page