Refactored keccak interface

- Allow calculating keccak hash in steps
- Only allow 32 and 200 byte final hashes
This commit is contained in:
SChernykh
2023-01-08 12:56:26 +01:00
parent 4f34c4466a
commit 632f3faac5
9 changed files with 58 additions and 31 deletions
+1 -1
View File
@@ -1032,7 +1032,7 @@ void p2pool::parse_get_miner_data_rpc(const char* data, size_t size)
}
hash h;
keccak(reinterpret_cast<const uint8_t*>(data), static_cast<int>(size), h.h, HASH_SIZE);
keccak(reinterpret_cast<const uint8_t*>(data), static_cast<int>(size), h.h);
if (h == m_getMinerDataHash) {
LOGWARN(4, "Received a duplicate get_miner_data RPC response, ignoring it");
return;