Changeset 7690


Ignore:
Timestamp:
04/02/12 19:52:05 (10 years ago)
Author:
ascheibe
Message:

#1809 added password encryption/decryption for Clients.Common

Location:
trunk/sources/HeuristicLab.Clients.Common/3.3
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Common/3.3/ClientFactory.cs

    r7259 r7690  
    4141      where T : ClientBase<I>, I
    4242      where I : class {
    43       return CreateClient<T, I>(endpointConfigurationName, remoteAddress, Settings.Default.UserName, Settings.Default.Password);
     43      return CreateClient<T, I>(endpointConfigurationName, remoteAddress, Settings.Default.UserName, CryptoService.DecryptString(Settings.Default.Password));
    4444    }
    4545    public static T CreateClient<T, I>(string endpointConfigurationName, string remoteAddress, string userName, string password)
     
    7171    public static ChannelFactory<I> CreateChannelFactory<I>(string endpointConfigurationName, string remoteAddress)
    7272      where I : class {
    73       return CreateChannelFactory<I>(endpointConfigurationName, remoteAddress, Settings.Default.UserName, Settings.Default.Password);
     73      return CreateChannelFactory<I>(endpointConfigurationName, remoteAddress, Settings.Default.UserName, CryptoService.DecryptString(Settings.Default.Password));
    7474    }
    7575    public static ChannelFactory<I> CreateChannelFactory<I>(string endpointConfigurationName, string remoteAddress, string userName, string password)
  • trunk/sources/HeuristicLab.Clients.Common/3.3/HeuristicLab.Clients.Common-3.3.csproj

    r7435 r7690  
    108108    <Reference Include="System.Core" />
    109109    <Reference Include="System.Drawing" />
     110    <Reference Include="System.Security" />
    110111    <Reference Include="System.ServiceModel" />
    111112    <Reference Include="System.Windows.Forms" />
     
    117118  <ItemGroup>
    118119    <Compile Include="ClientFactory.cs" />
     120    <Compile Include="CryptoService.cs" />
    119121    <Compile Include="PasswordDialog.cs">
    120122      <SubType>Form</SubType>
  • trunk/sources/HeuristicLab.Clients.Common/3.3/PasswordDialog.cs

    r7259 r7690  
    3232    private void PasswordDialog_Load(object sender, EventArgs e) {
    3333      usernameTextBox.Text = Settings.Default.UserName;
    34       passwordTextBox.Text = Settings.Default.Password;
     34      passwordTextBox.Text = CryptoService.DecryptString(Settings.Default.Password);
    3535      savePasswordCheckBox.Checked = Settings.Default.SavePassword;
    3636    }
     
    4141      Settings.Default.Password = string.Empty;
    4242      Settings.Default.Save();
    43       Settings.Default.Password = passwordTextBox.Text;
     43      Settings.Default.Password = CryptoService.EncryptString(passwordTextBox.Text);
    4444      if (savePasswordCheckBox.Checked)
    4545        Settings.Default.Save();
  • trunk/sources/HeuristicLab.Clients.Common/3.3/Properties/Settings.Designer.cs

    r7435 r7690  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:4.0.30319.239
     4//     Runtime Version:4.0.30319.530
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    3838        [global::System.Configuration.UserScopedSettingAttribute()]
    3939        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    40         [global::System.Configuration.DefaultSettingValueAttribute("anonymous")]
    41         public string Password {
    42             get {
    43                 return ((string)(this["Password"]));
    44             }
    45             set {
    46                 this["Password"] = value;
    47             }
    48         }
    49        
    50         [global::System.Configuration.UserScopedSettingAttribute()]
    51         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    5240        [global::System.Configuration.DefaultSettingValueAttribute("True")]
    5341        public bool SavePassword {
     
    5947            }
    6048        }
     49       
     50        [global::System.Configuration.UserScopedSettingAttribute()]
     51        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     52        [global::System.Configuration.DefaultSettingValueAttribute("AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA36TvN4MDBkWUU6yPrzj49gAAAAACAAAAAAADZgAAwAAAABAAA" +
     53            "ABr3+B3SidbFwV5hCTHGoESAAAAAASAAACgAAAAEAAAAGSI+4CIIV5GmEl09qLBIxIYAAAAkpj3t9H1L" +
     54            "BYhpUjjoM6qEc83XlY0xbnuFAAAADY3OscJ1F9ThR3SHB0sLax4TAN8")]
     55        public string Password {
     56            get {
     57                return ((string)(this["Password"]));
     58            }
     59            set {
     60                this["Password"] = value;
     61            }
     62        }
    6163    }
    6264}
  • trunk/sources/HeuristicLab.Clients.Common/3.3/Properties/Settings.settings

    r4387 r7690  
    66      <Value Profile="(Default)">anonymous</Value>
    77    </Setting>
    8     <Setting Name="Password" Type="System.String" Scope="User">
    9       <Value Profile="(Default)">anonymous</Value>
    10     </Setting>
    118    <Setting Name="SavePassword" Type="System.Boolean" Scope="User">
    129      <Value Profile="(Default)">True</Value>
    1310    </Setting>
     11    <Setting Name="Password" Type="System.String" Scope="User">
     12      <Value Profile="(Default)">AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA36TvN4MDBkWUU6yPrzj49gAAAAACAAAAAAADZgAAwAAAABAAAABr3+B3SidbFwV5hCTHGoESAAAAAASAAACgAAAAEAAAAGSI+4CIIV5GmEl09qLBIxIYAAAAkpj3t9H1LBYhpUjjoM6qEc83XlY0xbnuFAAAADY3OscJ1F9ThR3SHB0sLax4TAN8</Value>
     13    </Setting>
    1414  </Settings>
    1515</SettingsFile>
  • trunk/sources/HeuristicLab.Clients.Common/3.3/app.config

    r4387 r7690  
    1111                <value>anonymous</value>
    1212            </setting>
    13             <setting name="Password" serializeAs="String">
    14                 <value>anonymous</value>
    15             </setting>
    1613            <setting name="SavePassword" serializeAs="String">
    1714                <value>True</value>
     15            </setting>
     16            <setting name="Password" serializeAs="String">
     17                <value>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA36TvN4MDBkWUU6yPrzj49gAAAAACAAAAAAADZgAAwAAAABAAAABr3+B3SidbFwV5hCTHGoESAAAAAASAAACgAAAAEAAAAGSI+4CIIV5GmEl09qLBIxIYAAAAkpj3t9H1LBYhpUjjoM6qEc83XlY0xbnuFAAAADY3OscJ1F9ThR3SHB0sLax4TAN8</value>
    1818            </setting>
    1919        </HeuristicLab.Clients.Common.Properties.Settings>
Note: See TracChangeset for help on using the changeset viewer.