mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-22 21:50:14 +01:00
refactor: make GetRand a template, remove GetRandInt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user