DJB Hash
DJB is a hash function algorithm.
public static uint DJBHash(string str)
{
uint hash = 5381;
uint i = 0;
for (i = 0; i < str.Length; i++)
{
hash = ((hash << 5) + hash) + ((byte)str[(int)i]);
}
return hash;
}
Example
string data = "jdfgsdhfsdfsd 6445dsfsd7fg/*/+bfjsdgf%$^";
uint value = DJBHash(data);
Output
2562861588