Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to store Login passwords (in some format rather than original text) in SQL Database that unable or difficult to be hacked.

1. What is the best algorithm for that?
2. Can anyone explain how this algorithm will work for matching while matching during login ???

Thanks.....
Posted

The best algorithm for storing passwords is not storing any passwords; this is unsafe and absolutely not needed for authentication.

Surprised, disagree? Please see my past answers:
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
Decryption of Encrypted Password[^],
storing password value int sql server with secure way[^].

—SA
 
Share this answer
 
Comments
Tom Marvolo Riddle 23-Jan-14 2:35am    
Thanks a lot for detailed explanation My 5.
Sergey Alexandrovich Kryukov 23-Jan-14 8:59am    
Thank you.
—SA
The best thing to do is to google for articles and read up on how to use the stuff that is BUILD IN to SQL Server, instead of writing something inferior to that yourself.

Basically, the best solutions actually encrypt the password, and the login code encrypts the password, and compares the encrypted values. A secure system does not allow anyone to access the actual passwords, even if they have access to the database.
 
Share this answer
 
Comments
Tom Marvolo Riddle 23-Jan-14 2:34am    
5+

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