35 #include <boost/utility/value_init.hpp> 57 static_assert(
sizeof(
hash) ==
HASH_SIZE,
"Invalid structure size");
58 static_assert(
sizeof(
hash8) == 8,
"Invalid structure size");
70 cn_fast_hash(data, length, reinterpret_cast<char *>(&h));
83 tree_hash(
reinterpret_cast<const char (*)[
HASH_SIZE]
>(hashes), count, reinterpret_cast<char *>(&root_hash));
87 epee::to_hex::formatted(o, epee::as_byte_span(v));
return o;
90 epee::to_hex::formatted(o, epee::as_byte_span(v));
return o;
#define CRYPTO_MAKE_COMPARABLE(type)
Definition: generic-ops.h:38
static const crypto::hash8 null_hash8
Definition: hash.h:94
void cn_slow_hash(const void *data, size_t length, char *hash, int variant, int prehashed)
Definition: slow-hash.c:1451
void tree_hash(const char(*hashes)[HASH_SIZE], size_t count, char *root_hash)
Definition: tree-hash.c:70
crypto namespace.
Definition: crypto.cpp:59
static const crypto::hash null_hash
Definition: hash.h:93
void cn_slow_hash_prehashed(const void *data, std::size_t length, hash &hash, int variant=0)
Definition: hash.h:78
#define POD_CLASS
Definition: pod-class.h:43
void cn_fast_hash(const void *data, size_t length, char *hash)
Definition: hash.c:46
POD_CLASS hash8
Definition: hash.h:52
POD_CLASS hash
Definition: hash.h:49
std::ostream & operator<<(std::ostream &o, const crypto::public_key &v)
Definition: crypto.h:265
#define CRYPTO_MAKE_HASHABLE(type)
Definition: generic-ops.h:75