5#ifndef BITCOIN_CRYPTO_MUHASH_H
6#define BITCOIN_CRYPTO_MUHASH_H
23#ifdef __SIZEOF_INT128__
26 static constexpr int LIMBS = 48;
31 static constexpr int LIMBS = 96;
37 static_assert(
LIMB_SIZE *
LIMBS == 3072,
"Num3072 isn't 3072 bits");
39 static_assert(
sizeof(
limb_t) * 8 ==
LIMB_SIZE,
"LIMB_SIZE is incorrect");
42 static_assert(
sizeof(
limb_t) == 4 ||
sizeof(
limb_t) == 8,
"bad size for limb_t");
55 for (
auto& limb : obj.limbs) {
A class representing MuHash sets.
Num3072 ToNum3072(Span< const unsigned char > in)
SERIALIZE_METHODS(MuHash3072, obj)
MuHash3072() noexcept=default
void Finalize(uint256 &out) noexcept
MuHash3072 & Remove(Span< const unsigned char > in) noexcept
MuHash3072 & Insert(Span< const unsigned char > in) noexcept
Num3072 GetInverse() const
static constexpr int LIMBS
static constexpr size_t BYTE_SIZE
bool IsOverflow() const
Indicates whether d is larger than the modulus.
void ToBytes(unsigned char(&out)[BYTE_SIZE])
static constexpr int LIMB_SIZE
void Divide(const Num3072 &a)
SERIALIZE_METHODS(Num3072, obj)
void Multiply(const Num3072 &a)