Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login password aplication
Message
De
09/09/1999 21:57:29
 
 
À
09/09/1999 21:28:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00263219
Message ID:
00263225
Vues:
26
>Hi, I have 2 diferents type of users an Administrators and the others, in my initial forms I ask if the user is administrator or not, if the answer is yes, a password windows present. If the user is not an administrator,enter in the progran directly whitout some administrator function.
>My answer is how I save this password in a table (encripted) or in a file (encripted) or how.
>The administrator can change this password.
>I have only one user password.
>
>Tanks




Well, you can simply use a STAFF.dbf to carry the all password!!

What you can do is to write encript and decript function!!

e.g. enc.prg
Lparameters pText

gCode = 19
eText = []
For ix = 1 to Len(pText)
* Since most key in are normal key, no need to check over 255!
eText = eText + CHR(ASC(SubStr(pText, ix,1)) + gCode + ix)
Endif

Return eText

dec.prg
Lparameters hText

gCode = 19
cText = []
For ix = 1 to Len(hText)
* Since most key in are normal key, no need to check over 255!
cText = cText + CHR(ASC(SubStr(hText, ix,1)) - gCode - ix)
Endif

Return cText



Then, you can simply code:

Replace Staff.Passwd With Enc(Thisform.txtAssignPasswd.Value)

Even you can make a complex encript function that cannot revert!!

What you do is to check:
enc(ThisForm.txtLoginPasswd.value) == Staff.Passwd

if yes, login pass!!

^_~ Anyway, it is safety to write your own enc.prg Just a simply game for you!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform