Originally Posted by codeVBA
Public Shared Function cript(ByVal strToCript As String) As String
Dim ent() As Int16 = {0, 10, 21, 31, 3, 14, 26, 24, 23, 16, 12, 8, 27, 17, 28, 1, 5, 2, 30, 7, 18, 29, 9, 4, 13, 6, 20, 19, 22, 25, 11, 15}
Dim usc() As Int16 = {0, 11, 25, 22, 19, 20, 6, 13, 4, 9, 29, 18, 7, 30, 2, 1, 15, 28, 17, 27, 8, 12, 16, 23, 24, 26, 14, 3, 31, 21, 10, 5}
Dim c6 As String = Chr(216)
Dim p As String = String.Empty
Dim x, z, r, a, s As Integer
Dim w2 As String = String.Empty
If strToCript = String.Empty Then cript = String.Empty : Exit Function
If Asc(Mid$(strToCript, 1, 1)) = 255 Then cript = strToCript : Exit Function