private void CheckKeyFile() { DefaultConfiguration.KeysFile = KeysFile ?? new Dictionary <string, string>(); if (KeysFile.Any()) { throw new ConfigurationErrorsException("KeyFile is already loaded"); } }
private void LoadFullKeyFile(string path, string masterPassword) { PropertiesFileEncrypter fileLoader = null; if (masterPassword == null) { fileLoader = new PropertiesFileEncrypter(path); } else { fileLoader = new PropertiesFileEncrypter(path, masterPassword); } fileLoader.LoadProperties(); foreach (var prop in fileLoader.Properties) { KeysFile.Add(prop.Key, prop.Value); } }