393 {
394
395 extern "C" {
397 }
398
399#pragma pack(push, 1)
402 };
404 char data[8];
405 };
407 char data[64];
408 };
409#pragma pack(pop)
410
411 static_assert(
sizeof(
hash) ==
HASH_SIZE,
"Invalid structure size");
412 static_assert(
sizeof(
hash8) == 8,
"Invalid structure size");
413 static_assert(
sizeof(
hash64) == 64,
"Invalid structure size");
414
415
416
417
418
421 }
422
425 cn_fast_hash(data, length,
reinterpret_cast<char *
>(&h));
426 return h;
427 }
428
431 }
432
435 }
436
439 }
440
443 }
446 }
449 }
450
451 const static crypto::hash null_hash = boost::value_initialized<crypto::hash>();
452 const static crypto::hash8 null_hash8 = boost::value_initialized<crypto::hash8>();
453 const static crypto::hash64 null_hash64 = boost::value_initialized<crypto::hash64>();
454}
455
#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[]