I have an ASP.NET membership database and I need to decrypt the encrypted passwords. I would like to do this via PowerShell or C#. I have the salt, machine key, and the encrypted password string. This is an example of what I have so far but I don't know where the Salt and Machine Key should come into play.
try
{
byte[] data = Encoding.UTF8.GetBytes(pwd);
data = this.DecryptPassword(data);
return Encoding.UTF8.GetString(data);
}
catch (Exception ex)
{
return ex.Message;
// No machine key?
}