protected override string ReadValue(XmlReader reader) { return(Transformations.FolderNames(reader.Value)); }
private const string PASSWORD_KEY = "MPExtended Password Key"; // And here all our security goes out of the window: the key is on the internet. internal static void Install() { Transformations.RegisterCallback(Transformations.Transformation.FolderNames, FolderSubstitution); Transformations.RegisterCallback(Transformations.Transformation.Encrypt, Encrypt); Transformations.RegisterCallback(Transformations.Transformation.Decrypt, Decrypt); }
public void SetPasswordFromPlaintext(string password) { EncryptedPassword = password == String.Empty ? String.Empty : Transformations.Encrypt(password); }
public void ReadXml(XmlReader reader) { XElement document = XElement.Load(reader.ReadSubtree(), LoadOptions.None); foreach (XElement plugin in document.Elements(XName.Get("Plugin", document.Name.NamespaceName))) { this[plugin.Attribute("name").Value] = new List<PluginConfigItem>(); foreach (var configItem in plugin.Elements()) { ConfigType type = (ConfigType)Enum.Parse(typeof(ConfigType), configItem.Attribute("type").Value, true); string value = type == ConfigType.File || type == ConfigType.Folder ? Transformations.FolderNames(configItem.Value) : configItem.Value; this[plugin.Attribute("name").Value].Add(new PluginConfigItem() { DisplayName = configItem.Attribute("displayname").Value, Name = configItem.Name.LocalName, Type = type, Value = value }); } } }
public string GetPassword() { return(EncryptedPassword == String.Empty ? String.Empty : Transformations.Decrypt(EncryptedPassword)); }
public string GetAbsoluteTVLogoDirectory() { return(Transformations.FolderNames(TVLogoDirectory)); }
public void SetPasswordFromPlaintext(string password) { EncryptedPassword = Transformations.Encrypt(password); }
public string GetPassword() { return(Transformations.Decrypt(EncryptedPassword)); }
private List <PluginConfigItem> ReadPluginConfig(XElement plugin) { var list = new List <PluginConfigItem>(); foreach (var x in plugin.Elements()) { ConfigType type = (ConfigType)Enum.Parse(typeof(ConfigType), x.Attribute("type").Value, true); string value = type == ConfigType.File || type == ConfigType.Folder ? Transformations.FolderNames(x.Value) : x.Value; list.Add(new PluginConfigItem() { DisplayName = x.Attribute("displayname").Value, Name = x.Name.LocalName, Type = type, Value = value }); } return(list); }