kaccak: remove unused return value

getblocktemplate-height
moneromooo-monero 7 years ago
parent 4877aca2b6
commit e3e838d0cf
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -75,7 +75,7 @@ void keccakf(uint64_t st[25], int rounds)
// compute a keccak hash (md) of given byte length from "in" // compute a keccak hash (md) of given byte length from "in"
typedef uint64_t state_t[25]; 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; state_t st;
uint8_t temp[144]; 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); keccakf(st, KECCAK_ROUNDS);
memcpy(md, st, mdlen); memcpy(md, st, mdlen);
return 0;
} }
void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md) void keccak1600(const uint8_t *in, size_t inlen, uint8_t *md)

@ -16,7 +16,7 @@
#endif #endif
// compute a keccak hash (md) of given byte length from "in" // 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 // update the state
void keccakf(uint64_t st[25], int norounds); void keccakf(uint64_t st[25], int norounds);

@ -74,16 +74,12 @@ namespace
{ {
size_t inlen = sizeof(source); size_t inlen = sizeof(source);
int mdlen = (int)sizeof(md); int mdlen = (int)sizeof(md);
int ret = keccak(source, inlen, md, mdlen); keccak(source, inlen, md, mdlen);
if (md[0] != 0x00) if (md[0] != 0x00)
{ {
return true; return true;
} }
else if (!ret)
{
return true;
}
else else
{ {
return false; return false;

Loading…
Cancel
Save