5 #ifndef BITCOIN_CRYPTO_SIPHASH_H 6 #define BITCOIN_CRYPTO_SIPHASH_H 17 static constexpr uint64_t
C0{0x736f6d6570736575ULL},
C1{0x646f72616e646f6dULL},
C2{0x6c7967656e657261ULL},
C3{0x7465646279746573ULL};
22 std::array<uint64_t, 4>
v{};
72 #endif // BITCOIN_CRYPTO_SIPHASH_H Optimized SipHash-2-4 implementation for uint256.
static constexpr uint64_t C2
CSipHasher & Write(uint64_t data)
Hash a 64-bit integer worth of data.
std::array< uint64_t, 4 > v
PresaltedSipHasher(uint64_t k0, uint64_t k1) noexcept
Shared SipHash internal state v[0..3], initialized from (k0, k1).
CSipHasher(uint64_t k0, uint64_t k1)
Construct a SipHash calculator initialized with 128-bit key (k0, k1).
static constexpr uint64_t C1
SipHashState(uint64_t k0, uint64_t k1) noexcept
uint64_t Finalize() const
Compute the 64-bit SipHash-2-4 of the data written so far.
uint64_t operator()(const uint256 &val) const noexcept
Equivalent to CSipHasher(k0, k1).Write(val).Finalize().
static constexpr uint64_t C3
General SipHash-2-4 implementation.
const SipHashState m_state
uint8_t m_count
Only the low 8 bits of the input size matter.
static constexpr uint64_t C0