>>>where? im using VFP 3.0 w/a text box....
>>
>>Layout - PasswordChar
>
>really... thnks and for encrypt it? do u have or know ne routine?
I used the system checksum routine.
Not to encrypt the password and unencrypt it, but to encrypt it and store and compare only the encrypted version.
SYS(2007) will take a character string and return something else.
What it is you don't care so long as it's always the same for the same input!
Of course, this one-way process means you can never SEE the password but that's just like Novell, NT and just about all secure systems. All you can do is change the password to a new one.
Once the user has typed in their password, I use the function SYS(2007, txtPassword.value) to get the converted value which I compare against what's stored in the database.
It's secure, quick and I had to write one line of code!
OK, the SYS() function returns only 65000 unique values, so that with 6-character passwords the same numbers are returned about 1 in 1.5million tries.
But you cannot work backwards from the values in the table to the password you have to type to get them - so it's secure.