Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. uint32_t jenkins_one_at_a_time_hash(char *key, size_t len)
  2. {
  3. uint32_t hash, i;
  4. for(hash = i = 0; i < len; ++i)
  5. {
  6. hash += key[i];
  7. hash += (hash << 10);
  8. hash ^= (hash >> 6);
  9. }
  10. hash += (hash << 3);
  11. hash ^= (hash >> 11);
  12. hash += (hash << 15);
  13. return hash;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement