28 while (
data.size() > 0) {
29 t |= uint64_t{
data.front()} << (8 * (c % 8));
72 .Compress2(val.GetUint64(0))
73 .Compress2(val.GetUint64(1))
74 .Compress2(val.GetUint64(2))
75 .Compress2(val.GetUint64(3))
76 .Compress2(uint64_t{32} << 56)
83 .Compress2(val.GetUint64(0))
84 .Compress2(val.GetUint64(1))
85 .Compress2(val.GetUint64(2))
86 .Compress2(val.GetUint64(3))
87 .Compress2((uint64_t{36} << 56) | extra)
General SipHash-2-4 implementation.
uint8_t m_count
Only the low 8 bits of the input size matter.
uint64_t Finalize() const
Compute the 64-bit SipHash-2-4 of the data written so far.
CSipHasher(uint64_t k0, uint64_t k1)
Construct a SipHash calculator initialized with 128-bit key (k0, k1).
CSipHasher & Write(uint64_t data)
Hash a 64-bit integer worth of data.
uint64_t operator()(const uint256 &val) const noexcept
Equivalent to CSipHasher(k0, k1).Write(val).Finalize().
Shared SipHash state (v0..v3) with its round, compression, and finalization primitives.
ALWAYS_INLINE SipHashState Copy() const noexcept
Construct a copy of this state.
ALWAYS_INLINE uint64_t Finalize3U() noexcept
Mutably finalize this state with 3 SipRounds using the unpadded finalizer, and return the resulting h...
ALWAYS_INLINE uint64_t Finalize4() noexcept
Mutably finalize this state with 4 SipRounds, and return the resulting hash.
ALWAYS_INLINE SipHashState & Compress2(uint64_t data) noexcept
Mutably compress one block into this state, with 2 SipRounds.
A custom weaker variant of SipHash-1-3 without padding, and supporting "jumbo" inputs.
SipHasher13UJ & Write(uint64_t data) noexcept
Hash a normal 64-bit value.
SipHasher13UJ & WriteJumbo(const uint256 &hash) noexcept
Hash a 256-bit value as a jumbo block.
uint64_t Finalize() const noexcept
Compute the 64-bit SipHash-1-3-UJ of the data written so far.
static const PrecomputedData data
Precomputed COutPoint and CCoins values.
BlockValidationState m_state