uint32 hash_any(unsigned char *k, register int keylen)
{
register uint32 a, b, c, len;
len = keylen; a = b = 0x9e3779b9; c = 3923095;
while (len >= 12) {
a += (k[0] + (k[1]<<8) + (k[2]<<16) + (k[3]<<24));
b += (k[4] + (k[5]<<8) + (k[6]<<16) + (k[7]<<24));
c += (k[8] + (k[9]<<8) + (k[10]<<16) + (k[11]<<24));
mix(a, b, c); k += 12; len -= 12;
}
mix(a, b, c);
return c;
}
|