I have a legacy application that uses the ASP.NET membership provider w/ SQL backend. The passwords in the database are set to clear. I would like to encrypt these passwords while preserving the individual passwords. How can I programatically go about accomplishing this?
I know that in order for ASP.NET to recognize the change, I'll need to change the database password format, password salt, and the password itself. I'll also need to change the password format in the ASP.NET configuration to use the encrypted password format.
Essentially, I would need to generate a salt, grab the password, apply an encryption to the password, but I'm a little lost on how to actually encrypt the password.
SqlMembershipProvider
withPasswordFormat=Clear
and you wants to change this toPasswordFormat=Hashed
orEncrypted
without forcing everyone to reset their password? You mention salt - so you want Hashed not Encrypted? Are your requirements recoverable-password or don't-force-password-change? – Rup