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.

Recommended Answers

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

Jump to Post

You could try the encrypt/decrypt functions posted by sandeepparekh9 here

Jump to Post

All 6 Replies

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

You could try the encrypt/decrypt functions posted by sandeepparekh9 here

can u please explain me the entire code?

It looks like it has been documented pretty thoroughly.

since m new to vb.net ...can u please explain me the entire code ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.