Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt password

How can I encrypt the password field in asp.net MVC to be store in encrypted form?

like image 399
Fraz Sundal Avatar asked May 22 '10 16:05

Fraz Sundal


People also ask

Should I Encrypt passwords?

Password encryption is essential to store user credentials stored in a database securely. Without password encryption, anyone accessing a user database on a company's servers (including hackers) could easily view any stored passwords.

How do encrypted passwords work?

Password Encryption: How Do Password Encryption Methods Work? Encryption scrambles your password so it's unreadable and/or unusable by hackers. That simple step protects your password while it's sitting in a server, and it offers more protection as your password zooms across the internet.


1 Answers

Typical workflow would involve generating a salt value and using that to hash the password and then storing them both in the row. This is documented in detail in many places and is easily searched.

If you truly just want a way to quickly hash or encrypt without salt take a look at FormsAuthentication.HashPasswordForStoringInConfigFile

like image 155
Sky Sanders Avatar answered Sep 18 '22 07:09

Sky Sanders