lstrip 0s in created hashes

master
Kevin F 1 year ago
parent ebcc2ed632
commit b57b9f396e
  1. 5
      CHANGELOG.md
  2. 2
      mimcvdf/__init__.py
  3. 2
      setup.py

@ -2,6 +2,11 @@
This project uses Semantic Versioning
## 1.2.1
* lstrip created hashes 0
## 1.2.0
+ Accepted C+gmp implementation of MiMC from @cartr

@ -36,7 +36,7 @@ def vdf_create(data: bytes, rounds: int = DEFAULT_ROUNDS, dec=False) -> str:
input_data: int = _sha3_256_hash(data)
if dec:
return int.from_bytes(reverse_mimc(input_data, rounds), "big")
return reverse_mimc(input_data, rounds).hex()
return reverse_mimc(input_data, rounds).hex().lstrip('\0')
def vdf_verify(

@ -1,7 +1,7 @@
from setuptools import setup, find_packages, Extension
setup(name='mimcvdf',
version='1.2.0',
version='1.2.1',
description='Generic high level VDF using MiMC',
author='Kevin Froman',
author_email='beardog@mailbox.org',

Loading…
Cancel
Save