3#include "../blake2s/blake2s.hpp"
4#include "../keccak/keccak.hpp"
5#include "../sha256/sha256.hpp"
10 static constexpr size_t BLOCK_SIZE = 64;
11 static constexpr size_t OUTPUT_SIZE = 32;
12 static std::vector<uint8_t> hash(
const std::vector<uint8_t>& message)
14 keccak256 hash_result = ethash_keccak256(&message[0], message.size());
16 std::vector<uint8_t> output;
19 memcpy((
void*)&output[0], (
void*)&hash_result.word64s[0], 32);
25 static constexpr size_t BLOCK_SIZE = 64;
26 static constexpr size_t OUTPUT_SIZE = 32;
28 template <
typename B = std::vector<u
int8_t>>
static auto hash(
const B& message) {
return sha256::sha256(message); }
32 static constexpr size_t BLOCK_SIZE = 64;
33 static constexpr size_t OUTPUT_SIZE = 32;
34 static auto hash(
const std::vector<uint8_t>& message) {
return blake2::blake2s(message); }
Definition: hashers.hpp:31
Definition: hashers.hpp:9
Definition: hashers.hpp:24
Definition: hash_types.hpp:14