Base class for all hashing classes. More...
#include <hash.h>

Public Member Functions | |
| virtual uint64_t | operator() (const uint8_t *key, const int32_t len) const final |
| Hash byte array. More... | |
| virtual uint64_t | operator() (const size_t val) const final |
| Hash an integer. More... | |
| template<int32_t key_len> | |
| uint64_t | operator() (const FlowKey< key_len > &flowkey) const |
| Hash a flowkey. More... | |
Static Public Member Functions | |
| static void | random_seed () |
| Randomize the seed of the pseudo-randomness generator. More... | |
Base class for all hashing classes.
Any derived class only has to implement a private uint64_t hash(const uint8_t *, const int32_t) const method. Note that
are automatically inherited so that they internally call hash(const uint8_t *, const int32_t) const to hash the input.
|
inline |
Hash a flowkey.
| key_len | length of flowkey |
| flowkey | the flowkey to hash |
|
inlinefinalvirtual |
Hash an integer.
| val | integer to hash |
|
inlinefinalvirtual |
Hash byte array.
| key | pointer to the byte array |
| len | length of the byte array |
|
inlinestatic |
Randomize the seed of the pseudo-randomness generator.