DEK Hash

DEK is a hash function algorithm.



									Public Shared Function DEKHash(str As String) As UInteger
	Dim hash As UInteger = CUInt(str.Length)
	Dim i As UInteger = 0

	For i = 0 To str.Length - 1
		hash = ((hash << 5) Xor (hash >> 27)) Xor CByte(AscW(str(CInt(i))))
	Next

	Return hash
End Function
								


Example

									Dim data = "jdfgsdhfsdfsd 6445dsfsd7fg/*/+bfjsdgf%$^"
Dim value = DEKHash(data)
								


Output

									3354994598