JS Hash

JS is a bitwise hash function algorithm.



									public static uint JSHash(string str)
{
	uint hash = 1315423911;
	uint i = 0;

	for (i = 0; i < str.Length; i++)
	{
		hash ^= ((hash << 5) + ((byte)str[(int)i]) + (hash >> 2));
	}

	return hash;
}
								


Example

									string data = "jdfgsdhfsdfsd 6445dsfsd7fg/*/+bfjsdgf%$^";
uint value = JSHash(data);
								


Output

									3189953700