From a2bc544f33b7bfe16ab9c8752886e77548ea98fd Mon Sep 17 00:00:00 2001 From: kimkkikki Date: Tue, 31 Jul 2018 16:21:42 +0900 Subject: [PATCH] Fatal bug fixes - The input value is not set. - Does not run in Python. --- phi2.c | 2 +- setup.py | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/phi2.c b/phi2.c index b3e57f5..d02a753 100644 --- a/phi2.c +++ b/phi2.c @@ -24,7 +24,7 @@ void phi2_hash(const char* input, char* output) sph_skein512_context ctx_skein; sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512(&ctx_cubehash, (const void*) hash, (144,80)); + sph_cubehash512(&ctx_cubehash, input, (144,80)); sph_cubehash512_close(&ctx_cubehash, (void*)hashB); LYRA2(&hashA[ 0], 32, &hashB[ 0], 32, &hashB[ 0], 32, 1, 8, 8); diff --git a/setup.py b/setup.py index 1f24dbc..875a00d 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,22 @@ from distutils.core import setup, Extension phi2_hash_module = Extension('phi2_hash', - sources = ['phi2module.c', - 'phi2.c', - 'sph/aes_helper.c', - 'sph/skein.c', - 'sph/jh.c', - 'sph/cubehash.c', - 'sph/streebog.c', - 'sph/echo.c', - 'lyra2/Lyra2.c'], - include_dirs=['.', './sph', '.lyra2']) + sources=['phi2module.c', + 'phi2.c', + 'sph/aes_helper.c', + 'sph/skein.c', + 'sph/jh.c', + 'sph/cubehash.c', + 'sph/streebog.c', + 'sph/echo.c', + 'lyra2/Lyra2.c', + 'lyra2/Sponge.c'], + include_dirs=['.', './sph', '.lyra2']) -setup (name = 'phi2_hash', - version = '2.0', - description = 'Bindings for phi2 hashing algorithm used by Luxcoin ', - author='216k155', - author_email='216k155@luxcore.io', - url='https://github.com/216k155/phi2_hashing_module', - ext_modules = [phi2_hash_module]) \ No newline at end of file +setup(name='phi2_hash', + version='2.1', + description='Bindings for phi2 hashing algorithm used by Luxcoin ', + author='216k155', + author_email='216k155@luxcore.io', + url='https://github.com/216k155/phi2_hashing_module', + ext_modules=[phi2_hash_module])