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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file parahash-0.1.0.tar.gz
.
File metadata
- Download URL: parahash-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe18e214694b17c82c5b09fae5f0364dae6ffc705914ab04ff5151b7151dc8e8 |
|
MD5 | 0e41cae9ed5144796e2e3f93c194cc77 |
|
BLAKE2b-256 | 48192bbbd8bcfc0bc6a4d39e8050ba6b169ad5c6fbd30476dac8205c370534d0 |
File details
Details for the file parahash-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: parahash-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b4ad0197e80541fe1922c4f3855dca93c6b3e63843fc71af144f19cdb6f8d5 |
|
MD5 | 0ca62f6d98dc54682c9b3ec8c7a854cb |
|
BLAKE2b-256 | f93cd54556bdc06862d77d16b29c18df4300e6dcc1d28fa4078ffb4ea8d9e528 |