Warehouse of hashing classes. More...
Classes | |
| class | AwareHash |
| Aware hash. More... | |
| class | HashBase |
| Base class for all hashing classes. More... | |
Warehouse of hashing classes.
All hashing classes in this warehouse are capable of hashing flowkey, integer and byte array to an uint64_t or an uint32_t value (implementation-defined). To craft a new hashing class, please inherit from HashBase, and the derived class only has to provide a simple interface looked exactly like uint64_t hash(const uint8_t *key, const int32_t len) const; (also a pure virtual function in HashBase). See the example below.
uint8_t *, rather than int8_t * or char *, is chosen for byte array is that multitudinous hash functions (if not all) are built upon unsigned integers.