Python Cryptonight
Project description
Python binding for Monero hash functions cn_fast_hash, cn_slow_hash.
cn_fast_hash is used mainly for hashing to scalars / EC points.
cn_slow_hash is CryptoNight hash function used for mining and encryption key derivation for encrypted wallet files.
Py2, Py3 compatible + tests.
pip install py-cryptonight
Usage
import binascii
import pycryptonight
pycryptonight.cn_fast_hash(b'1')
# hexcoded: b'c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6
pycryptonight.cn_slow_hash(b'1')
# hexcoded: b'cbdfba46388e040422b4a9daa471726be659ae184ee86420c2795647f0b301d5
# variant 1:
pycryptonight.cn_slow_hash(binascii.unhexlify(b'38274c97c45a172cfc97679870422e3a1ab0784960c60514d816271415c306ee3a3ed1a77e31f6a885c3cb'), 1) # variant 1
# hexcoded: b'ed082e49dbd5bbe34a3726a0d1dad981146062b39d36d62c71eb1ed8ab49459b
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
py_cryptonight-0.1.5.tar.gz
(289.8 kB
view hashes)
Built Distributions
Close
Hashes for py_cryptonight-0.1.5-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 790008ab77a6b6d8751183a635f0fea298f6795cc87a022d714fcfa4c69b446c |
|
MD5 | 7cee635286f392b367d95bab17f27d8f |
|
BLAKE2b-256 | 8a2408bf00f2bce62080f0039479f9963b97ee6c42f1223ba971ffc9136f9230 |
Close
Hashes for py_cryptonight-0.1.5-cp27-cp27m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7bcf7f6b10a393bb35e495c75a8696f1c923f2401dc55f3799c9a80af26c899 |
|
MD5 | 3570bb1eec1d62f0997e7deae0ba048e |
|
BLAKE2b-256 | dbd3f3f2cbb27a91d4fb6b9117a7f0ae7dc562d5d4bc0b7f66c6e8771792a23f |