Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hash.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [Raju], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
10#include <vector>
11
13
15 static fr hash(const std::vector<fr>& inputs) { return crypto::pedersen_hash::hash(inputs); }
16
17 static fr hash_pair(const fr& lhs, const fr& rhs) { return hash(std::vector<fr>({ lhs, rhs })); }
18
19 static fr zero_hash() { return fr::zero(); }
20};
21
27
28 static fr hash_pair(const fr& lhs, const fr& rhs) { return hash(std::vector<fr>({ lhs, rhs })); }
29
30 static fr zero_hash() { return fr::zero(); }
31};
32
33} // namespace bb::crypto::merkle_tree
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
static Fq hash(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen hash using generators from context.
Definition pedersen.cpp:78
AvmProvingInputs inputs
static fr hash_pair(const fr &lhs, const fr &rhs)
Definition hash.hpp:17
static fr hash(const std::vector< fr > &inputs)
Definition hash.hpp:15
static fr hash_pair(const fr &lhs, const fr &rhs)
Definition hash.hpp:28
static fr hash(const std::vector< fr > &inputs)
Definition hash.hpp:23
static constexpr field zero()