mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Support seeding for hashers.
This commit is contained in:
parent
d2d8aff814
commit
1576239f67
2 changed files with 14 additions and 1 deletions
|
@ -74,6 +74,17 @@ bool CounterVector::DoUnserialize(UnserialInfo* info)
|
|||
}
|
||||
|
||||
|
||||
HashPolicy::Hasher::Hasher(size_t seed)
|
||||
: h3_(seed)
|
||||
{
|
||||
}
|
||||
|
||||
HashPolicy::HashType
|
||||
HashPolicy::Hasher::operator()(const void* x, size_t n) const
|
||||
{
|
||||
return h3_(x, n);
|
||||
}
|
||||
|
||||
HashPolicy::HashVector DefaultHashing::Hash(const void* x, size_t n) const
|
||||
{
|
||||
HashVector h(K(), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue