public void Connect() { Encrypter encrypter = new Encrypter("64bit"); String keyword = encrypter.Decrypt("QnV0IHlvdSBkb24ndCByZWFsbHkgbWVhbiBpdA=="); // Check if crypter is changed Assert.AreEqual(true, encrypter.SetCrypter("AES")); this.connection = encrypter.Decrypt ("Sf+ulELX4tNuvsQtUG2EZWPJDPhm8obnrSyEm7F5mtg/eziYSjoIZndeCHk8iZOhvAuMNJBxiiatrRHTt2LVFv/vJNoo8yCHkOO7TwUWv3+l8+Wpis4TSsEvc8zHgEPIucH/OQ2tyYlMboyoFH26dZLZ2Y+Kevfu79VfqLBcKGE=", keyword); }
/*public ISessionFactory Session { get { session = fluentCfg.BuildSessionFactory(); return session; } }*/ public DatabaseConfiguration() { Encrypter encrypter = new Encrypter("64bit"); string keyword = encrypter.Decrypt("QnV0IHlvdSBkb24ndCByZWFsbHkgbWVhbiBpdA=="); encrypter.SetCrypter("AES"); this.connectionString = encrypter.Decrypt("Sf+ulELX4tNuvsQtUG2EZWPJDPhm8obnrSyEm7F5mtg/eziYSjoIZndeCHk8iZOhvAuMNJBxiiatrRHTt2LVFv/vJNoo8yCHkOO7TwUWv3+l8+Wpis4TSsEvc8zHgEPIucH/OQ2tyYlMboyoFH26dZLZ2Y+Kevfu79VfqLBcKGE=", keyword); fluentCfg = Fluently.Configure().Database(PostgreSQLConfiguration.Standard.ConnectionString(this.connectionString)).Mappings(m => { m.HbmMappings.AddFromAssemblyOf<Users>(); m.HbmMappings.AddFromAssemblyOf<Contacts>(); }); var config = fluentCfg.BuildSessionFactory(); }
public XConnection() { Encrypter encrypter = new Encrypter("64bit"); String keyword = encrypter.Decrypt("QnV0IHlvdSBkb24ndCByZWFsbHkgbWVhbiBpdA=="); if (encrypter.SetCrypter("AES")) { String connection = encrypter.Decrypt ("Sf+ulELX4tNuvsQtUG2EZWPJDPhm8obnrSyEm7F5mtg/eziYSjoIZndeCHk8iZOhvAuMNJBxiiatrRHTt2LVFv/vJNoo8yCHkOO7TwUWv3+l8+Wpis4TSsEvc8zHgEPIucH/OQ2tyYlMboyoFH26dZLZ2Y+Kevfu79VfqLBcKGE=", keyword); _Connection = new NpgsqlConnection(connection); } else { throw new XConnectionException(); } }
public void Connect() { Console.WriteLine(); TestHelper.log("Decrypting keyword"); Encrypter encrypter = new Encrypter("64bit"); String keyword = encrypter.Decrypt("QnV0IHlvdSBkb24ndCByZWFsbHkgbWVhbiBpdA=="); TestHelper.done(); TestHelper.log("Decrypting connection parameters"); Assert.AreEqual(true, encrypter.SetCrypter("AES")); TestHelper.done(); TestHelper.log("Connection decritpion"); try { this.connection = encrypter.Decrypt ("Sf+ulELX4tNuvsQtUG2EZWPJDPhm8obnrSyEm7F5mtg/eziYSjoIZndeCHk8iZOhvAuMNJBxiiatrRHTt2LVFv/vJNoo8yCHkOO7TwUWv3+l8+Wpis4TSsEvc8zHgEPIucH/OQ2tyYlMboyoFH26dZLZ2Y+Kevfu79VfqLBcKGE=", keyword); TestHelper.done(); } catch (Exception e) { TestHelper.error(e.Message); } TestHelper.log("Connection test"); try { NpgsqlConnection _Connection = new NpgsqlConnection(connection); Assert.IsNotNull(_Connection); TestHelper.done(); } catch (Exception e) { TestHelper.error(e.Message); } }