/ Published in: VB.NET
Passing in a seed and your string will return an encrypted string. Pass in the same seed and the encrypted string again and it will return the original unencrypted string.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Public Function EncryptString(ByVal InSeed As Integer, ByVal InString As String) As String Dim c1 As Integer Dim NewEncryptString As String Dim EncryptSeed As Integer Dim EncryptChar As String NewEncryptString = "" EncryptSeed = InSeed For c1 = 1 To Len(InString) EncryptChar = Mid(InString, c1, 1) EncryptSeed = EncryptSeed Xor c1 NewEncryptString = NewEncryptString & EncryptChar Next EncryptString = NewEncryptString End Function
URL: http://codefinds.blogspot.com/2009/01/simple-string-encryption.html