1

I am quite confused how to encrypt the password store in the database so that if the database found by pupil it cannot take password from the table .Anyone can show me how to encrypt password .I m using microsoft acess as the databese.


please help ....thx

5
Contributors
5
Replies
13
Views
7 Years
Discussion Span
Last Post by Luc001
0

>password encryption

You have to use/learn classes from System.Security.Cryptography namespace.

Edited by __avd: n/a

-1

Hi use this for simple one

Public Function SimpleCrypt(ByVal Text As String)
        ' Encrypts/decrypts the passed string using 
        ' a simple ASCII value-swapping algorithm

        Dim strTempChar As String, 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

Edited by __avd: Added [code] tags.

Votes + Comments
Bad advice )-:
0

Hi,

It's like adatapost said.
You need the System Security Cryptography class for it.
Look here.

Edited by Luc001: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.