|
My mistake, c is CODE. -----Original Message----- OK, Rich, I am either
going to look like I don’t know what I am doing and should quit
programming, or I am truly confused. I hope I am only confused. I accept that the XOR
with the ASC and the MID, will somehow in/decrypt the password, but 1. What is ‘c’ in the XOR? 2. Where is the constant CODE used, and how? ( was the ‘c’
suppose to be ‘CODE’ to provide an encryption string?) TKs -----Original Message----- About password
security in VB and VBA...in VB...scripts can be secured by compiling them and
VBA files can be locked with a password.
This doesn’t prevent viewing the file image in a text editor and
possibly distinguishing a password there. Entering
the password string, say "ABCD", can be hidden with a simple Xor
encryption such as: Enter
Crypt("05&6") Where
Crypt is: Function
Crypt(ByVal PW As String) As String Dim
i As Integer Const
CODE = "qwertyasdfjklqweru" For i = 1 To Len(PW)
Mid(PW, i, 1) = Chr(Asc(Mid(PW, i, 1)) Xor Asc(Mid(c, i, 1))) Next Crypt = PW End
Function and
"05&6" is equal to Crypt("ABCD"). Rich McNeil 866 653 5105 |
- [Talk] Password Security in VB and VBA Rich McNeil
- RE: [Talk] Password Security in VB and VBA Lew Hundley
- Rich McNeil
