Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I create one login and one user form. I have create the user form which store the user password in encryption format. i want when user enter password in login form textbox, then require to decrypt the password form database where userid also require to match and compare the decrypted password and user entered password.
Posted
Comments
Sergey Alexandrovich Kryukov 26-Mar-13 2:37am    
Why did you try to pretend that you answer some the questions of other members? And why did you accept such fake answers formally?
This is called cheating.
—SA

The password is not to be decrypted. In fact it is not encrypted but 'hashed'. When the user enters the password , hash it and compare with the hashed password stored in the database. If both the strings match , then the password is correct.

Use SQL Membership provider instead of re-writing the same code again http://www.asp.net/web-forms/videos/how-do-i/how-do-i-set-up-the-sql-membership-provider[^]
 
Share this answer
 
Hi,

Don't encrypt and decrypt a password, you need to 'hash' a password. Have a look at this Tip:
Password Storage: How to do it.[^]
And also have a look at this article:
The Art & Science of Storing Passwords[^]
 
Share this answer
 
Password should never be stored anywhere. It is absolutely not needed for authentication. Surprised? Please see my past answers:
storing password value int sql server with secure way[^],
Decryption of Encrypted Password[^],
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
TCP Connection with username and password[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900