38 } |
38 } |
39 size_t len = key->len; |
39 size_t len = key->len; |
40 |
40 |
41 unsigned m = 0x5bd1e995; |
41 unsigned m = 0x5bd1e995; |
42 unsigned r = 24; |
42 unsigned r = 24; |
43 unsigned h = 25 ^ len; |
43 unsigned h = 25 ^ (unsigned) len; |
44 unsigned i = 0; |
44 unsigned i = 0; |
45 while (len >= 4) { |
45 while (len >= 4) { |
46 unsigned k = data[i + 0] & 0xFF; |
46 unsigned k = data[i + 0] & 0xFF; |
47 k |= (data[i + 1] & 0xFF) << 8; |
47 k |= (data[i + 1] & 0xFF) << 8; |
48 k |= (data[i + 2] & 0xFF) << 16; |
48 k |= (data[i + 2] & 0xFF) << 16; |