Use proper option for USE_KECCAK via options.h

pull/25/head
Alex Beregszaszi 8 years ago
parent 23590c05c6
commit d68906ec4e

@ -56,4 +56,9 @@
#define BIP39_CACHE_SIZE 4
#endif
// support Keccak hashing
#ifndef USE_KECCAK
#define USE_KECCAK 0
#endif
#endif

@ -331,7 +331,7 @@ void sha3_Final(SHA3_CTX *ctx, unsigned char* result)
if (result) me64_to_le_str(result, ctx->hash, digest_length);
}
#ifdef USE_KECCAK
#if USE_KECCAK
/**
* Store calculated hash into the given array.
*

@ -21,6 +21,7 @@
#define __SHA3_H__
#include <stdint.h>
#include "options.h"
#ifdef __cplusplus
extern "C" {
@ -57,7 +58,7 @@ void sha3_512_Init(SHA3_CTX *ctx);
void sha3_Update(SHA3_CTX *ctx, const unsigned char* msg, size_t size);
void sha3_Final(SHA3_CTX *ctx, unsigned char* result);
#ifdef USE_KECCAK
#if USE_KECCAK
#define keccak_224_Init sha3_224_Init
#define keccak_256_Init sha3_256_Init
#define keccak_384_Init sha3_384_Init

Loading…
Cancel
Save