Usually for passwords, I use hashing. Because hashing doesn't have a decryption method, I consider it pretty secure. So all passwords are stored in their hashed form. When I need to check the password, instead of decrypting the hashed password, I hash the plain text version and compare the two. You can use the forms authentication class to get at the hashing method...
System.Web.Security.FormsAuthentication.HashPasswo rdForStoringInConfigFile(password, algorithm)
The algorithm argument can be either "sha1" or "md5".
|