aboutsummaryrefslogtreecommitdiff
path: root/src/util/hasher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/hasher.cpp')
-rw-r--r--src/util/hasher.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/util/hasher.cpp b/src/util/hasher.cpp
index f571725786..3109ba02a8 100644
--- a/src/util/hasher.cpp
+++ b/src/util/hasher.cpp
@@ -7,14 +7,18 @@
#include <span.h>
#include <util/hasher.h>
-SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand<uint64_t>()), k1(GetRand<uint64_t>()) {}
+SaltedTxidHasher::SaltedTxidHasher() :
+ k0{FastRandomContext().rand64()},
+ k1{FastRandomContext().rand64()} {}
SaltedOutpointHasher::SaltedOutpointHasher(bool deterministic) :
- k0(deterministic ? 0x8e819f2607a18de6 : GetRand<uint64_t>()),
- k1(deterministic ? 0xf4020d2e3983b0eb : GetRand<uint64_t>())
+ k0{deterministic ? 0x8e819f2607a18de6 : FastRandomContext().rand64()},
+ k1{deterministic ? 0xf4020d2e3983b0eb : FastRandomContext().rand64()}
{}
-SaltedSipHasher::SaltedSipHasher() : m_k0(GetRand<uint64_t>()), m_k1(GetRand<uint64_t>()) {}
+SaltedSipHasher::SaltedSipHasher() :
+ m_k0{FastRandomContext().rand64()},
+ m_k1{FastRandomContext().rand64()} {}
size_t SaltedSipHasher::operator()(const Span<const unsigned char>& script) const
{