public string ReadApiKey(string source)
        {
            var settings = new UserSettings(new PhysicalFileSystem(Environment.CurrentDirectory));
            string key = settings.GetDecryptedValue(ApiKeysSectionName, source);

            if (String.IsNullOrEmpty(key))
            {
                if (IsFirstTimeAfterUpdate && source.Equals(NuGetConstants.V2LegacyFeedUrl, StringComparison.OrdinalIgnoreCase))
                {
                    key = Settings.Default.PublishPrivateKey;
                }
            }

            return key;
        }
 public void WriteApiKey(string source, string apiKey)
 {
     var settings = new UserSettings(new PhysicalFileSystem(Environment.CurrentDirectory));
     settings.SetEncryptedValue(ApiKeysSectionName, source, apiKey);
 }