aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/crypto/keccak.c4
-rw-r--r--src/crypto/keccak.h2
-rw-r--r--tests/unit_tests/crypto.cpp6
3 files changed, 3 insertions, 9 deletions
diff --git a/src/crypto/keccak.c b/src/crypto/keccak.c
index 5564c7db3..fc6d487c2 100644
--- a/src/crypto/keccak.c
+++ b/src/crypto/keccak.c
@@ -75,7 +75,7 @@ void keccakf(uint64_t st[25], int rounds)
// compute a keccak hash (md) of given byte length from "in"
typedef uint64_t state_t[25];
-int keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
+void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
{
state_t st;
uint8_t temp[144];
@@ -116,8 +116,6 @@ int keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
keccakf(st, KECCAK_ROUNDS);
memcpy(md, st, mdlen);
-
- return 0;
}
void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md)
diff --git a/src/crypto/keccak.h b/src/crypto/keccak.h
index fbd8e1904..fb9d8bd04 100644
--- a/src/crypto/keccak.h
+++ b/src/crypto/keccak.h
@@ -16,7 +16,7 @@
#endif
// compute a keccak hash (md) of given byte length from "in"
-int keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen);
+void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen);
// update the state
void keccakf(uint64_t st[25], int norounds);
diff --git a/tests/unit_tests/crypto.cpp b/tests/unit_tests/crypto.cpp
index 51e26c2bb..d9a7b8ad5 100644
--- a/tests/unit_tests/crypto.cpp
+++ b/tests/unit_tests/crypto.cpp
@@ -74,16 +74,12 @@ namespace
{
size_t inlen = sizeof(source);
int mdlen = (int)sizeof(md);
- int ret = keccak(source, inlen, md, mdlen);
+ keccak(source, inlen, md, mdlen);
if (md[0] != 0x00)
{
return true;
}
- else if (!ret)
- {
- return true;
- }
else
{
return false;