Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using cipher to encrypt
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00960312
Message ID:
00960586
Vues:
12
What is the result of:
IF .NOT. ALLTRIM(ENCRYPT(thisform.Password.Value, "aqwsrweq")) == ALLTRIM(Login.password)
   WAIT WINDOW "The user name or password is incorrect. Please try again." TIMEOUT 1.5
   THISFORM.Password.Value = ""
   THISFORM.Password.SetFocus	
ELSE
   thisform.release
ENDIF
>Hi Borislav
>
>I have now added users and the encryption works looking at the table.
>
>But when I log in with my password it gives me password invalid. Here is my code for the onclick event for logging in:
>
>
>LOCATE FOR UPPER(login.userid) = UPPER(ALLTRIM(THISFORM.UserName.DisplayValue))
>
>IF .NOT. ENCRYPT(thisform.Password.Value, "aqwsrweq") == Login.password
>		WAIT WINDOW "The user name or password is incorrect. Please try again." TIMEOUT 1.5
>		THISFORM.Password.Value = ""
>		THISFORM.Password.SetFocus	
>	ELSE
>		thisform.release
>ENDIF
>
>
>Similarly, here is my code for the onclick event when creating a user:
>
>
>INSERT INTO 'login' ( userid, password) ;
>VALUES  (thisform.username.value, thisform.password.value)
>
>REPLACE password WITH ENCRYPT(thisform.password.Value, "aqwsrweq")
>		
>thisform.username.value=""
>thisform.password.Value=""
>
>
>Any help would be gratefully appreciated.
>
>Many Thanks
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform