7#define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
28 v[0] = 0x736f6d6570736575ULL ^ k0;
29 v[1] = 0x646f72616e646f6dULL ^
k1;
30 v[2] = 0x6c7967656e657261ULL ^ k0;
31 v[3] = 0x7465646279746573ULL ^
k1;
37 uint64_t v0 =
v[0], v1 =
v[1], v2 =
v[2], v3 =
v[3];
56 uint64_t v0 =
v[0], v1 =
v[1], v2 =
v[2], v3 =
v[3];
61 t |= uint64_t(*(data++)) << (8 * (c % 8));
83 uint64_t v0 =
v[0], v1 =
v[1], v2 =
v[2], v3 =
v[3];
85 uint64_t t =
tmp | (uint64_t(
count) << 56);
96 return v0 ^ v1 ^ v2 ^ v3;
103 uint64_t v0 = 0x736f6d6570736575ULL ^ k0;
104 uint64_t v1 = 0x646f72616e646f6dULL ^
k1;
105 uint64_t v2 = 0x6c7967656e657261ULL ^ k0;
106 uint64_t v3 = 0x7465646279746573ULL ^
k1 ^ d;
126 v3 ^= uint64_t(4) << 59;
129 v0 ^= uint64_t(4) << 59;
135 return v0 ^ v1 ^ v2 ^ v3;
143 uint64_t v0 = 0x736f6d6570736575ULL ^ k0;
144 uint64_t v1 = 0x646f72616e646f6dULL ^
k1;
145 uint64_t v2 = 0x6c7967656e657261ULL ^ k0;
146 uint64_t v3 = 0x7465646279746573ULL ^
k1 ^ d;
166 d = (uint64_t(36) << 56) | extra;
176 return v0 ^ v1 ^ v2 ^ v3;
static const uint8_t k1[32]
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 GetUint64(int pos) const
uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra)
uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256 &val)
Optimized SipHash-2-4 implementation for uint256.