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: Complete, auditors: [Nishat], commit: 22d6fc368da0fbe5412f4f7b2890a052aa48d803 }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
9#include <vector>
10
12
18
19 static fr hash_pair(const fr& lhs, const fr& rhs) { return hash(std::vector<fr>({ lhs, rhs })); }
20
21 static fr hash_pair_with_separator(uint64_t sep, const fr& lhs, const fr& rhs)
22 {
23 return hash(std::vector<fr>({ fr(sep), lhs, rhs }));
24 }
25
26 static fr zero_hash() { return fr::zero(); }
27};
28
29} // namespace bb::crypto::merkle_tree
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
AvmProvingInputs inputs
field< Bn254FrParams > fr
Definition fr.hpp:155
static fr hash_pair(const fr &lhs, const fr &rhs)
Definition hash.hpp:19
static fr hash(const std::vector< fr > &inputs)
Definition hash.hpp:14
static fr hash_pair_with_separator(uint64_t sep, const fr &lhs, const fr &rhs)
Definition hash.hpp:21
static constexpr field zero()