private void SaveEncryptedPassword() { if (!string.IsNullOrEmpty(Password)) { using (var xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { xmlwriter.SetValue("radiotime", "encryptedPassword", PasswordUtility.EncryptData(Password, DataProtectionScope.LocalMachine)); xmlwriter.RemoveEntry("radiotime", "password"); } } }
private void SaveEncryptedPassword() { if (!string.IsNullOrEmpty(Password)) { using (var xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { xmlwriter.SetValue("radiotime", "encryptedPassword", PasswordUtility.EncryptData(Password, DataProtectionScope.LocalMachine)); xmlwriter.RemoveEntry("radiotime", "password"); } } }