I'm using this encrypting function psoted by a member:

Public Function SimpleCrypt(ByVal Text As String)

        Dim strTempChar As String = ""
        Dim i As Integer
        For i = 1 To Text.Length
            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

My problem is when i try to encrypt a string containing the number '5'.
On my database(oracle 11g r2 XE) the number 5 is encrypted as the letter M, but on VB it shows as µ. So when I compare the contents of the my password textbox to the one in my database, they won't match.

This encryption is at very basic level, best advice don't use it u can find more encryption Try this . Actually this is in c# but you can easily converted to vb.net by online code converter.
Hope this will help you

Edited 4 Years Ago by bhagawatshinde: n/a

This article has been dead for over six months. Start a new discussion instead.