Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs	(revision 7662)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs	(revision 7663)
@@ -214,15 +214,15 @@
 
     public void PersistSubscriptionsToUserConfig() {
-      StringCollection strCol = new StringCollection();
+      Settings.Default.Upgrade();
+      StringCollection strCol = Settings.Default.AzureSubscriptions;
+      strCol.Clear();
       foreach (Subscription sub in Subscriptions) {
         if (sub.SaveToConfig) {
           string setting = sub.GetSettingString();
-          Settings.Default.AzureSubscriptions.Add(setting);
-        }
-      }
-      //TODO: 
-      //Settings.Default.Upgrade();
-      //Settings.Default.Save();
-
+          setting = CryptoService.EncryptString(CryptoService.ToSecureString(setting));
+          strCol.Add(setting);
+        }
+      }
+      Settings.Default.Save();
     }
 
@@ -230,5 +230,6 @@
       StringCollection strCol = new StringCollection();
       foreach (string azureSub in strCol) {
-        Subscription s = Subscription.ParseSettingString(azureSub);
+        string setting = CryptoService.ToInsecureString(CryptoService.DecryptString(azureSub));
+        Subscription s = Subscription.ParseSettingString(setting);
         s.SaveToConfig = true;
         Add(s);
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CryptoService.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CryptoService.cs	(revision 7663)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CryptoService.cs	(revision 7663)
@@ -0,0 +1,54 @@
+﻿
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Security.Cryptography;
+using System.Text;
+namespace HeuristicLab.Clients.Hive.CloudManager {
+  // see: http://weblogs.asp.net/jgalloway/archive/2008/04/13/encrypting-passwords-in-a-net-app-config-file.aspx
+  public static class CryptoService {
+    private static byte[] entropy = System.Text.Encoding.Unicode.GetBytes("Salt Is Not A Password");
+
+    public static string EncryptString(SecureString input) {
+      byte[] encryptedData = ProtectedData.Protect(
+        Encoding.Unicode.GetBytes(ToInsecureString(input)),
+        entropy,
+        DataProtectionScope.CurrentUser);
+      return Convert.ToBase64String(encryptedData);
+    }
+
+    public static SecureString DecryptString(string encryptedData) {
+      try {
+        byte[] decryptedData = System.Security.Cryptography.ProtectedData.Unprotect(
+          Convert.FromBase64String(encryptedData),
+          entropy,
+          System.Security.Cryptography.DataProtectionScope.CurrentUser);
+        return ToSecureString(System.Text.Encoding.Unicode.GetString(decryptedData));
+      }
+      catch {
+        return new SecureString();
+      }
+    }
+
+    public static SecureString ToSecureString(string input) {
+      SecureString secure = new SecureString();
+      foreach (char c in input) {
+        secure.AppendChar(c);
+      }
+      secure.MakeReadOnly();
+      return secure;
+    }
+
+    public static string ToInsecureString(SecureString input) {
+      string returnValue = string.Empty;
+      IntPtr ptr = Marshal.SecureStringToBSTR(input);
+      try {
+        returnValue = Marshal.PtrToStringBSTR(ptr);
+      }
+      finally {
+        Marshal.ZeroFreeBSTR(ptr);
+      }
+      return returnValue;
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj	(revision 7662)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj	(revision 7663)
@@ -45,4 +45,5 @@
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Security" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
@@ -62,4 +63,5 @@
     <Compile Include="Azure\Utils.cs" />
     <Compile Include="CloudManagerClient.cs" />
+    <Compile Include="CryptoService.cs" />
     <Compile Include="MenuItems\CloudManagerMenuItem.cs" />
     <Compile Include="Model\AffinityGroup.cs" />
