56 static_assert(
sizeof(
hash) ==
HASH_SIZE,
"Invalid structure size");
57 static_assert(
sizeof(
hash8) == 8,
"Invalid structure size");
69 cn_fast_hash(data, length,
reinterpret_cast<char *
>(&h));
73 inline void cn_slow_hash(
const void *data, std::size_t length,
hash &
hash,
int variant = 0, uint64_t height = 0) {
74 cn_slow_hash(data, length,
reinterpret_cast<char *
>(&
hash), variant, 0, height);
78 cn_slow_hash(data, length,
reinterpret_cast<char *
>(&
hash), variant, 1, height);
86 epee::to_hex::formatted(o, epee::as_byte_span(v));
return o;
89 epee::to_hex::formatted(o, epee::as_byte_span(v));
return o;
#define CRYPTO_MAKE_COMPARABLE(type)
Definition: generic-ops.h:38
#define CRYPTO_MAKE_HASHABLE(type)
Definition: generic-ops.h:75
@ HASH_SIZE
Definition: hash-ops.h:77
crypto namespace.
Definition: crypto.cpp:60
void cn_fast_hash(const void *data, std::size_t length, hash &hash)
Definition: hash.h:63
void cn_slow_hash_prehashed(const void *data, std::size_t length, hash &hash, int variant=0, uint64_t height=0)
Definition: hash.h:77
constexpr static crypto::hash null_hash
Definition: hash.h:92
void tree_hash(const hash *hashes, std::size_t count, hash &root_hash)
Definition: hash.h:81
POD_CLASS hash8
Definition: hash.h:51
constexpr static crypto::hash8 null_hash8
Definition: hash.h:93
std::ostream & operator<<(std::ostream &o, const crypto::public_key &v)
Definition: crypto.h:295
POD_CLASS hash
Definition: hash.h:48
void cn_slow_hash(const void *data, std::size_t length, hash &hash, int variant=0, uint64_t height=0)
Definition: hash.h:73
mdb_size_t count(MDB_cursor *cur)
Definition: value_stream.cpp:39
#define POD_CLASS
Definition: pod-class.h:43