5#ifndef BITCOIN_UTIL_HASHER_H
6#define BITCOIN_UTIL_HASHER_H
16template <
typename C>
class Span;
71 template <u
int8_t hash_select>
74 static_assert(hash_select <8,
"SignatureCacheHasher only has 8 hashes available.");
76 std::memcpy(&u, key.
begin()+4*hash_select, 4);
An outpoint - a combination of a transaction hash and an index n into its vout.
size_t operator()(const COutPoint &id) const noexcept
Having the hash noexcept allows libstdc++'s unordered_map to recalculate the hash during rehash,...
SaltedOutpointHasher(bool deterministic=false)
size_t operator()(const Span< const unsigned char > &script) const
size_t operator()(const uint256 &txid) const
We're hashing a nonce into the entries themselves, so we don't need extra blinding in the set hash co...
uint32_t operator()(const uint256 &key) const
A Span is an object that can refer to a contiguous sequence of objects.
constexpr unsigned char * begin()
static uint64_t ReadLE64(const unsigned char *ptr)
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.
size_t operator()(const uint256 &hash) const