摘要: #includestdio.h#includestring.h#include stdlib.h#include stdint.huint32_t rotate_hash(char *key, uint32_t len, uint32_t mask){ uint32_t hash, i; for (hash=0, i=0; ilen; ++i) hash = (hash5)^(hash27)^key[i]; return hash = (hash ^ (hash10) ^ (hash20)) & mask; // replace (hash % prime) 阅读全文
posted @ 2010-12-25 11:06 napoleon_liu 阅读(391) 评论(0) 推荐(0) 编辑