diff options
author | pasta <pasta@dashboost.org> | 2022-01-31 19:32:59 +0700 |
---|---|---|
committer | pasta <pasta@dashboost.org> | 2022-04-22 09:04:39 -0500 |
commit | ab1ea29ba1b8379a21fabd3dc859552c470a6421 (patch) | |
tree | 799d831027961f820f5472ce75e93f14cd3e5217 /src/util/bytevectorhash.cpp | |
parent | 505ba3966562b10d6dd4162f3216a120c73a4edb (diff) | |
download | bitcoin-ab1ea29ba1b8379a21fabd3dc859552c470a6421.tar.xz |
refactor: make GetRand a template, remove GetRandInt
Diffstat (limited to 'src/util/bytevectorhash.cpp')
-rw-r--r-- | src/util/bytevectorhash.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/bytevectorhash.cpp b/src/util/bytevectorhash.cpp index bc060a44c9..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 |