MCPcopy Create free account
hub / github.com/ElementsProject/elements / HashToRange

Function HashToRange

src/test/fuzz/golomb_rice.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace {
22
23uint64_t HashToRange(const std::vector<uint8_t>& element, const uint64_t f)
24{
25 const uint64_t hash = CSipHasher(0x0706050403020100ULL, 0x0F0E0D0C0B0A0908ULL)
26 .Write(element.data(), element.size())
27 .Finalize();
28 return FastRange64(hash, f);
29}
30
31std::vector<uint64_t> BuildHashedSet(const std::unordered_set<std::vector<uint8_t>, ByteVectorHash>& elements, const uint64_t f)
32{

Callers 3

BuildHashedSetMethod · 0.85
MatchMethod · 0.85
BuildHashedSetFunction · 0.85

Calls 6

CSipHasherClass · 0.85
FastRange64Function · 0.85
FinalizeMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected