lstrip 0s in created hashes

This commit is contained in:
Kevin F 2022-01-18 12:22:53 -06:00
parent ebcc2ed632
commit b57b9f396e
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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(

View File

@ -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',