I'm on an adventure trying to write my own own implementation of a C CryptoNight/R hasher. I already have some working code but wanted something that could help me validate the hashes. Is there any online CryptoNight/R hasher out there? If not, is there some code implemented somewhere that is easier to understand than the code in the monero-project on Github?


1 Answer 1


I don't know of any web-based example but it's pretty easy to use py-cryptonight for testing/validation purposes.

For example:

pip install py-cryptonight

Then in Python:

import pycryptonight
import binascii

height = 123456
data = binascii.unhexlify('DEADBEEF')
prehashed = 0
variant = 5
hash = pycryptonight.cn_slow_hash(data, variant, prehashed, height)
print('Hash: {}'.format(binascii.hexlify(hash)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.