mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
AK: Implement SipHash as the default hash algorithm for most use cases
SipHash is highly HashDoS-resistent, initialized with a random seed at startup (i.e. non-deterministic) and usable for security-critical use cases with large enough parameters. We just use it because it's reasonably secure with parameters 1-3 while having excellent properties and not being significantly slower than before.
This commit is contained in:
parent
5e15c29e22
commit
9a026fc8d5
9 changed files with 282 additions and 11 deletions
|
@ -114,6 +114,9 @@ private:
|
|||
BucketType* m_bucket { nullptr };
|
||||
};
|
||||
|
||||
// A set datastructure based on a hash table with closed hashing.
|
||||
// HashTable can optionally provide ordered iteration when IsOrdered = true.
|
||||
// For a (more commonly required) map datastructure with key-value entries, see HashMap.
|
||||
template<typename T, typename TraitsForT, bool IsOrdered>
|
||||
class HashTable {
|
||||
static constexpr size_t grow_capacity_at_least = 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue