AP Hash
AP is a hybrid rotative and additive hash function algorithm.
public static uint APHash(string str)
{
uint hash = 0xAAAAAAAA;
uint i = 0;
for (i = 0; i < str.Length; i++)
{
hash ^= ((i & 1) == 0) ? ((hash << 7) ^ ((byte)str[(int)i]) * (hash >> 3)) :
(~((hash << 11) + (((byte)str[(int)i]) ^ (hash >> 5))));
}
return hash;
}
Example
string data = "jdfgsdhfsdfsd 6445dsfsd7fg/*/+bfjsdgf%$^";
uint value = APHash(data);
Output
2799550922