SDBM Hash

SDBM is a has function algorithm.



									Public Shared Function SDBMHash(str As String) As UInteger
	Dim hash As ULong = 0
	Dim i As UInteger = 0

	For i = 0 To str.Length - 1
		hash = ((CByte(AscW(str(CInt(i)))) + (hash << 6) + (hash << 16) - hash) And UInteger.MaxValue)
	Next

	Return hash
End Function
								


Example

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


Output

									423809171