aboutsummaryrefslogtreecommitdiff
path: root/src/util/bytevectorhash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/bytevectorhash.cpp')
-rw-r--r--src/util/bytevectorhash.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/bytevectorhash.cpp b/src/util/bytevectorhash.cpp
index f87d0e04b3..9054db4759 100644
--- a/src/util/bytevectorhash.cpp
+++ b/src/util/bytevectorhash.cpp
@@ -6,10 +6,10 @@
#include <random.h>
#include <util/bytevectorhash.h>
-ByteVectorHash::ByteVectorHash()
+ByteVectorHash::ByteVectorHash() :
+ m_k0(GetRand<uint64_t>()),
+ m_k1(GetRand<uint64_t>())
{
- GetRandBytes(reinterpret_cast<unsigned char*>(&m_k0), sizeof(m_k0));
- GetRandBytes(reinterpret_cast<unsigned char*>(&m_k1), sizeof(m_k1));
}
size_t ByteVectorHash::operator()(const std::vector<unsigned char>& input) const