how to store and retrieve password in encrypted format in database using asp.net

Posted by Gow.Net under ASP.NET on 9/9/2012 | Points: 10 | Views : 7314 | Status : [Member] | Replies : 3
how to store and retrieve password in encrypted format in database using asp.net?

gowthaman8870226416


Responses

Posted by: Vasanthmvp on: 9/9/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Encryption and decryption of passwords, storing them in the database is a best approach.
Actually, we can follow different algorithms to encrypt the text, but the best followed way is to use SHA, RSA, MD5 technique etc. adding salts. using
System.Security.Cryptography.ProtectedData class

Here is a sample and easy example which helps you understand.
http://chandradev819.wordpress.com/2011/04/11/how-to-encrypt-and-decrypt-password-in-asp-net-using-c/

If you want to customize your encryption code (i.e salt/whole plain text) in to a simple way: Just get the plain text and convert it to a byte array with some bit stuffing.
Here is a sample example to give a breadth of idea.

http://www.codeproject.com/Questions/195713/how-to-encrypt-and-decrypt-password-in-asp-net
http://www.dotnetfunda.com/forums/thread8843-how-to-store-passwrod-in-encrypted-format.aspx
http://www.dotnetfunda.com/articles/article367-encrypting-password-and-store-in-a-database-using-sqlserver.aspx

Regards,

Awesome Coding !! :)

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 9/10/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hi...
Look at this url
http://www.dotnetfunda.com/codes/code3086-encrypt-or-decrypt-your-password.aspx

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Tamilarasu on: 9/10/2012 [Member] Starter | Points: 25

Up
0
Down

Hi..
See the below link , Which is provided with an example & its source code
http://www.cprogrammings.com/result/Encryption-Decryption-in-asp.net-%7C-Encrypt-and-Decrypt-Password/63.html



Tamilarasu

Work Hard To Work Good !... .. ...

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response