#include "mfcpch.h"
#include "hashfn.h"
Go to the source code of this file.
Function Documentation
Definition at line 30 of file hashfn.cpp.
{
mask = (1 << bits) - 1;
keysize *= 8;
bitindex = 0;
keybits = 0;
hcode = 0;
do {
while (keysize > 0 && bitindex <= 24) {
keybits |= *((
uinT8 *) key) << bitindex;
bitindex += 8;
keysize -= 8;
}
hcode ^= keybits & mask;
keybits >>= bits;
}
while (keysize > 0);
return hcode;
}