diff --git a/crypto/c_groestl.c b/crypto/c_groestl.c index 3f98f00..94f9556 100644 --- a/crypto/c_groestl.c +++ b/crypto/c_groestl.c @@ -204,7 +204,7 @@ static void OutputTransformation(hashState *ctx) { /* initialise context */ static void Init(hashState* ctx) { - int i = 0; + uint32_t i = 0; /* allocate memory for state and data buffer */ for(;i<(SIZE512/sizeof(uint32_t));i++) diff --git a/cryptonight.c b/cryptonight.c index e92c77b..f889577 100644 --- a/cryptonight.c +++ b/cryptonight.c @@ -111,7 +111,7 @@ void cryptonight_hash(const char* input, char* output, uint32_t len) { uint8_t aes_key[AES_KEY_SIZE]; OAES_CTX* aes_ctx; - hash_process(&state.hs, input, len); + hash_process(&state.hs, (const uint8_t*) input, len); memcpy(text, state.init, INIT_SIZE_BYTE); memcpy(aes_key, state.hs.b, AES_KEY_SIZE); aes_ctx = oaes_alloc(); diff --git a/hefty1.c b/hefty1.c index c620be9..bc6dc1c 100644 --- a/hefty1.c +++ b/hefty1.c @@ -46,7 +46,7 @@ void hefty1_hash(const char* input, char* output, uint32_t len) memset(output, 0, 32); - char* hash[4] = { &hash32_2, &hash64_3, &hash64_4, &hash64_5 }; + char* hash[4] = { hash32_2, hash64_3, hash64_4, hash64_5 }; uint32_t i; uint32_t j; diff --git a/qubit.c b/qubit.c index 5f13b76..a98a38a 100644 --- a/qubit.c +++ b/qubit.c @@ -1,5 +1,8 @@ #include "qubit.h" +#include +#include + #include "sha3/sph_cubehash.h" #include "sha3/sph_luffa.h" #include "sha3/sph_shavite.h" diff --git a/sha3/sph_hefty1.c b/sha3/sph_hefty1.c index fadd151..3e3c74e 100644 --- a/sha3/sph_hefty1.c +++ b/sha3/sph_hefty1.c @@ -62,7 +62,7 @@ } \ /* Nothing up my sleeve constants */ -const static uint32_t K[64] = { +static const uint32_t K[64] = { 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, @@ -82,7 +82,7 @@ const static uint32_t K[64] = { }; /* Initial hash values */ -const static uint32_t H[HEFTY1_STATE_WORDS] = { +static const uint32_t H[HEFTY1_STATE_WORDS] = { 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, @@ -375,4 +375,4 @@ unsigned char* HEFTY1(const unsigned char *buf, size_t len, unsigned char *diges HEFTY1_Final(digest, &ctx); return digest; -} \ No newline at end of file +} diff --git a/shavite3.c b/shavite3.c index d3c158e..9ded9de 100644 --- a/shavite3.c +++ b/shavite3.c @@ -1,5 +1,8 @@ #include "shavite3.h" +#include +#include + #include "sha3/sph_shavite.h" void shavite3_hash(const char* input, char* output, uint32_t len)