kaccak: remove unused return value

This commit is contained in:
moneromooo-monero 2017-11-11 11:20:48 +00:00
parent 4877aca2b6
commit e3e838d0cf
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 3 additions and 9 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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;