Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kprasadreddy
Starting Member
41 Posts |
Posted - 2006-11-10 : 09:13:48
|
| How can I store passwords in the database for users with encryption?I have a table user with username and password as columns?Is there a way to store passwords in the databse with encryption?Thanks,Prasad |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-10 : 09:18:46
|
| Do not store encrypted passwords in the database. Store a irreversible hashvalue instead and compare with that value.Peter LarssonHelsingborg, Sweden |
 |
|
|
kprasadreddy
Starting Member
41 Posts |
Posted - 2006-11-10 : 09:20:33
|
| Can you tell me how I can do this because I absolutely have no clue... |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-10 : 13:27:00
|
| Use MD5 or any other hash algorithm BEFORE saving the password to the database.Use GOOGLE to search for this.Peter LarssonHelsingborg, Sweden |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2006-11-10 : 13:35:47
|
| +1 to thatUse MD5 or maybe Blowfish encryption to create a "one way hash" and store the hash in the database.Then, when a user goes to log in, take the password they entered, run it through the same one way hash algorithm and compare the result of that to what you have in the database.Michael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights. |
 |
|
|
|
|
|