Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Shared Function Hash(text As String) As Tuple(Of Int32, Int32)
- Dim charSet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()_+-=|[];',.{}:<>? "
- Dim a As Int32 = 0
- Dim b As Int32 = 0
- For Each letter As var In text
- Dim e = charSet.IndexOf(letter)
- If e = -1 Then
- e = charSet.Length + 1
- End If
- For i As var = 0 To 16
- a = a * -6 + b + &H74fa - e
- b = b / 3 + a + &H81be - e
- Next
- Next
- Return Tuple.Create(a, b)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement