Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ

Tips -N- Tricks

How to build a Password control for you application? by ramani
Posted: 10 Nov 01

** How to build a Password control for you application?
** by Subramanian.G (ramani)
**    FoxAcc Software
**    ramani_g@yahoo.com

A password table maintained using VFP in the normal way will show the passwords out to any one opening the Table. In order to hide this password field, we have to do some sort of encrption of the password. But without encryption, decryption software, we can achieve this functionality. While what I suggest is a simple method, you can develop your idea on this.

In the password form, i.e. login form, obviously you will have the text or combo for the user name and then a textbox for the password. Set the txtPassword text box property,

txtPassword.PasswordChar = "*"

This will hide the characters keyed in by the user and so, no one near can read what is keyed in.

The next thing to do is...
1. Do not bind this txtPassWord box to the underlying table.
2. Replace the Tables password field with the encrpted password. HERE IS THE TRICK I SUGGEST FOR THIS.

   LOCAL cPassValue
   REPLACE myPassWordField WITH cPassValue

3. Whenever the password is accepted, compare for accepting it, by converting the same way.

   IF myPassFile.myPasswordField = myInPass
      ** LET THE USER IN

4. If you need still additional security, add the LogIn pass and at the creation time.. a standard additional text, for example..

cPassValue = ;
   SYS(2007,"SECRET"+ ALLTRIM(ThisForm.txtPassWord.Value))

What we achieve is that, no one knows including you to decode this password field. Any one reading the Password Table cannot decode the checksum value.

- Ramani
** EOF **
** Ramani (Subramanian.G), FoxAcc, ramani_g@yahoo.com
Evaluate this to make others know how useful is this

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close