375 {
376
377 extern "C" {
379 }
380
381#pragma pack(push, 1)
384 };
386 char data[8];
387 };
389 char data[64];
390 };
391#pragma pack(pop)
392
393 static_assert(
sizeof(
hash) ==
HASH_SIZE,
"Invalid structure size");
394 static_assert(
sizeof(
hash8) == 8,
"Invalid structure size");
395 static_assert(
sizeof(
hash64) == 64,
"Invalid structure size");
396
397
398
399
400
403 }
404
407 cn_fast_hash(data, length,
reinterpret_cast<char *
>(&h));
408 return h;
409 }
410
413 }
414
417 }
418
421 }
422
425 }
428 }
431 }
432
433 const static crypto::hash null_hash = boost::value_initialized<crypto::hash>();
434 const static crypto::hash8 null_hash8 = boost::value_initialized<crypto::hash8>();
435 const static crypto::hash64 null_hash64 = boost::value_initialized<crypto::hash64>();
436}
437
#define CRYPTO_MAKE_COMPARABLE(type)
#define CRYPTO_MAKE_HASHABLE(type)
void cn_slow_hash_prehashed(const void *data, std::size_t length, hash &hash, int variant=0, uint64_t height=0)
void cn_fast_hash(const void *data, size_t length, char *hash)
void cn_slow_hash(const void *data, size_t length, char *hash, int variant, int prehashed, uint64_t height)
unsigned __int64 uint64_t
void tree_hash(const char(*hashes)[HASH_SIZE], size_t count, char *root_hash)
std::ostream & operator<<(std::ostream &o, const crypto::public_key &v)
span< const std::uint8_t > as_byte_span(const T &src) noexcept
static void formatted(std::ostream &out, const span< const std::uint8_t > src)
Append < + src + > as hex to out.
struct hash_func hashes[]