22#define NOEXCEPT noexcept
61 for (
auto& word : hash_result.
word64s) {
63 word = __builtin_bswap64(word);
66 std::array<uint8_t, 32> result;
68 for (
size_t i = 0; i < 4; ++i) {
69 for (
size_t j = 0; j < 8; ++j) {
70 uint8_t
byte =
static_cast<uint8_t
>(hash_result.
word64s[i] >> (56 - (j * 8)));
71 result[i * 8 + j] = byte;
75 return from_buffer<bb::fr>(result);
A wrapper class used to construct KeccakTranscript.
static bb::fr hash(std::vector< uint256_t > const &data)
const std::vector< FF > data
struct keccak256 ethash_keccak256(const uint8_t *data, size_t size) NOEXCEPT
struct keccak256 ethash_keccak256(const uint8_t *data, size_t size) NOEXCEPT
void ethash_keccakf1600(uint64_t state[25]) NOEXCEPT
struct keccak256 hash_field_elements(const uint64_t *limbs, size_t num_elements)
struct keccak256 hash_field_element(const uint64_t *limb)
uint8_t buffer[RANDOM_BUFFER_SIZE]
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< uint8_t > to_buffer(T const &value)