#include <byte_hasher.h>
Inheritance diagram for rotating_byte_hasher:


Public Member Functions | |
| virtual u_int | hash (const void *key_data, int key_length) const |
| returns a value that can be used for indexing into a hash table. | |
| virtual hashing_algorithm * | clone () const |
| implements cloning of the algorithm object. | |
This will only be usable for key types that have flat members; keys with pointers limit the meaning of the hash value, or destroy the meaning if the pointer value can change between lookups. Note that objects based on RTTI will probably never work with this either since the compiler stores extra data as part of the binary form for those objects.
Definition at line 30 of file byte_hasher.h.
| u_int rotating_byte_hasher::hash | ( | const void * | key_data, | |
| int | key_length | |||
| ) | const [virtual] |
returns a value that can be used for indexing into a hash table.
the returned value is loosely based on the "key_data" and the "key_length" we are provided with. note: do not use a huge key length for this or your hash table will be very slow; the key should probably be limited to 16 or less.
Implements hashing_algorithm.
Definition at line 26 of file byte_hasher.cpp.
References utility::hash_bytes().
| hashing_algorithm * rotating_byte_hasher::clone | ( | ) | const [virtual] |
implements cloning of the algorithm object.
Implements hashing_algorithm.
Definition at line 23 of file byte_hasher.cpp.
1.5.1