All pastes #385383 Raw Edit

Anonymous

public c v1 · immutable
·published 2007-03-07 20:48 UTC
rendered paste body
unsigned int APHash(char* str, unsigned int len){   unsigned int hash = 0;   unsigned int i    = 0;   for(i = 0; i < len; str++, i++)   {      hash ^= ((i & 1) == 0) ? (  (hash <<  7) ^ (*str) ^ (hash >> 3)) :                               (~((hash << 11) ^ (*str) ^ (hash >> 5)));   }   return hash;}