As long as you remember that this is
not a recommended way of encrypting anything sensitive you can use something like this:
vb.net Code:
Imports System.Text
Public Class Form1
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
MyBase.OnLoad(e)
'//you can use basically whatever you want for the offset
Dim encrypted As String = Me.EncryptDecrypt("ThisIs10..", 3)
MessageBox.Show(encrypted)
Dim decrypted As String = Me.EncryptDecrypt(encrypted, 3)
MessageBox.Show(decrypted)
End Sub
Public Function EncryptDecrypt(ByVal value As String, _
ByVal offset As Integer) As String
Dim result As New StringBuilder(value.Length)
For i = 0 To value.Length - 1
result.Append(Convert.ToChar( _
Convert.ToInt32(value(i)) Xor _
offset))
Next
Return result.ToString()
End Function
End Class
I would also recommend upgrading your VS version to 2008+...