Encrypt OR Decrypt a String Using ASCII Character.
Function used for Encrypting and Decrypting the String (User Password)
Purpose : Function used for Encrypting and Decrypting the String (User Password)
Variable : Variable Text(String to be Encrypted/Decrypted) used in this Function
Code : Public Function fnEnCryptDeCrypt(ByVal Text As String) As String
Dim strTempChar As String = "", i As Integer
For i = 1 To Len(Text)
If Asc(Mid$(Text, i, 1)) < 128 Then
strTempChar = CType(Asc(Mid$(Text, i, 1)) + 128, String)
ElseIf Asc(Mid$(Text, i, 1)) > 128 Then
strTempChar = CType(Asc(Mid$(Text, i, 1)) - 128, String)
End If
Mid$(Text, i, 1) = Chr(CType(strTempChar, Integer))
Next i
Return Text
End Function