lstrip 0s in created hashes
This commit is contained in:
parent
ebcc2ed632
commit
b57b9f396e
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
This project uses Semantic Versioning
|
This project uses Semantic Versioning
|
||||||
|
|
||||||
|
## 1.2.1
|
||||||
|
|
||||||
|
* lstrip created hashes 0
|
||||||
|
|
||||||
|
|
||||||
## 1.2.0
|
## 1.2.0
|
||||||
|
|
||||||
+ Accepted C+gmp implementation of MiMC from @cartr
|
+ 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)
|
input_data: int = _sha3_256_hash(data)
|
||||||
if dec:
|
if dec:
|
||||||
return int.from_bytes(reverse_mimc(input_data, rounds), "big")
|
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(
|
def vdf_verify(
|
||||||
|
2
setup.py
2
setup.py
@ -1,7 +1,7 @@
|
|||||||
from setuptools import setup, find_packages, Extension
|
from setuptools import setup, find_packages, Extension
|
||||||
|
|
||||||
setup(name='mimcvdf',
|
setup(name='mimcvdf',
|
||||||
version='1.2.0',
|
version='1.2.1',
|
||||||
description='Generic high level VDF using MiMC',
|
description='Generic high level VDF using MiMC',
|
||||||
author='Kevin Froman',
|
author='Kevin Froman',
|
||||||
author_email='beardog@mailbox.org',
|
author_email='beardog@mailbox.org',
|
||||||
|
Loading…
Reference in New Issue
Block a user