17 read(inputs_buffer, to_hash);
19 ctx.
offset =
static_cast<size_t>(ntohl(*hash_index));
27 read(inputs_buffer, to_hash);
29 ctx.
offset =
static_cast<size_t>(ntohl(*hash_index));
30 const size_t numHashes = to_hash.size() / 2;
33 while (count < numHashes) {
38 write(output, results);
43 std::vector<uint8_t> to_hash;
44 read(input_buffer, to_hash);
46 ctx.
offset =
static_cast<size_t>(ntohl(*hash_index));
static Fq hash_buffer(const std::vector< uint8_t > &input, GeneratorContext context={})
Given an arbitrary length of bytes, convert them to fields and hash the result using the default gene...
static Fq hash(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen hash using generators from context.
WASM_EXPORT void pedersen_hash(fr::vec_in_buf inputs_buffer, uint32_t const *hash_index, fr::out_buf output)
WASM_EXPORT void pedersen_hashes(fr::vec_in_buf inputs_buffer, uint32_t const *hash_index, fr::out_buf output)
WASM_EXPORT void pedersen_hash_buffer(uint8_t const *input_buffer, uint32_t const *hash_index, fr::out_buf output)
Entry point for Barretenberg command-line interface.
void read(B &it, field2< base_field, Params > &value)
void write(B &buf, field2< base_field, Params > const &value)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static void serialize_to_buffer(const field &value, uint8_t *buffer)
const uint8_t * vec_in_buf