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

View File

@@ -27,7 +27,7 @@ TEST(keccak, hashing)
hash output;
const uint8_t* data = reinterpret_cast<const uint8_t*>(input);
const int len = static_cast<int>(size);
keccak(data, len, output.h, HASH_SIZE);
keccak(data, len, output.h);
char buf[log::Stream::BUF_SIZE + 1];
log::Stream s(buf);