Private CONST GENKEY = &H87
''Sample: <Local Variable> = EnCode("127.0.0.1")
Private Function EnCode(ByVal IP As String) As String
Dim aBytes() As Byte
Dim i As Integer
aBytes = IP
aBytes(0) = aBytes(0) Xor GENKEY
For i = 1 To Ubound(aBytes)
aBytes(i) = aBytes(i) Xor aBytes(i - 1)
Next
EnCode = aBytes
End Sub