public static string SEED_K = "SESshxdRu3p4ik3IOxM6/qAWmmTYUw8N1ZGIh1Pgh2w=$pQgQvA49Cmwn8s7xRUxHmA==";//"sec.key"; static Common() { //SI NO HAY WRAPPERS CARGA DIRECTAMENTE if (WrapperFactory.ProviderSection.Providers.Count.Equals(0)) { CnnString = System.Configuration.ConfigurationManager.ConnectionStrings[CnnStringName].ConnectionString; CnnString_Entities = System.Configuration.ConfigurationManager.ConnectionStrings["HealthEntities"].ConnectionString; } else { //SI HAY, CHEQUEA QUE SEA LOCAL if (!WrapperFactory.ProviderSection.DefaultProvider.WrapperProviderType.Equals("LocalWrapper")) { CnnString = System.Configuration.ConfigurationManager.ConnectionStrings[CnnStringName].ConnectionString; CnnString_Entities = System.Configuration.ConfigurationManager.ConnectionStrings["HealthEntities"].ConnectionString; } } Fwk.Security.Cryptography.FwkSymetricAlg s = new FwkSymetricAlg(SEED_K); ISymetriCypher = s;// SymetricCypherFactory.Cypher();// SymetricCypherFactory.Get<RijndaelManaged>(SEED_K); if (System.Configuration.ConfigurationManager.AppSettings["logOnFile"] != null) { logOnFile = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["logOnFile"]); } }
public static string SEED_K = "SESshxdRu3p4ik3IOxM6/qAWmmTYUw8N1ZGIh1Pgh2w=$pQgQvA49Cmwn8s7xRUxHmA==";//"sec.key"; static Common() { //SI NO HAY WRAPPERS CARGA DIRECTAMENTE if (WrapperFactory.ProviderSection.Providers.Count.Equals(0)) { CnnString = System.Configuration.ConfigurationManager.ConnectionStrings[CnnStringName].ConnectionString; CnnString_Entities = System.Configuration.ConfigurationManager.ConnectionStrings["HealthEntities"].ConnectionString; } else { //SI HAY, CHEQUEA QUE SEA LOCAL if (!WrapperFactory.ProviderSection.DefaultProvider.WrapperProviderType.Equals("LocalWrapper")) { CnnString = System.Configuration.ConfigurationManager.ConnectionStrings[CnnStringName].ConnectionString; CnnString_Entities = System.Configuration.ConfigurationManager.ConnectionStrings["HealthEntities"].ConnectionString; } } Fwk.Security.Cryptography.FwkSymetricAlg s = new FwkSymetricAlg(SEED_K); ISymetriCypher = s;// SymetricCypherFactory.Cypher();// SymetricCypherFactory.Get<RijndaelManaged>(SEED_K); if (System.Configuration.ConfigurationManager.AppSettings["logOnFile"] != null) logOnFile = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["logOnFile"]); }
public static void chk() { DateTime expTime = new DateTime(); string expk = "keTtly7za5UIrDkDlqsU+jqBCzKoBM76no4hzuUnNOo=$5dPNk6aYiLiH+9+dPHfjIQ=="; string l = string.Empty; string sn = string.Empty; try { if (System.Configuration.ConfigurationManager.AppSettings["license"] != null) { l = System.Configuration.ConfigurationManager.AppSettings["license"].ToString(); } if (string.IsNullOrEmpty(l)) { TechnicalException te = new TechnicalException("Your pelsoft license is corrupted. Please contact your suppor or software provider"); te.Source = "Pelsoft Lic mannager"; te.ErrorId = "100"; throw te; } FwkSymetricAlg a = new FwkSymetricAlg(expk); string[] decrypted = a.Dencrypt(l).Split('$'); int index = 0; if (decrypted.Length == 2) { index = 1; sn = decrypted[0]; } string[] d = decrypted[index].Split('|'); expTime = new DateTime(Convert.ToInt32(d[2]), Convert.ToInt32(d[1]), Convert.ToInt32(d[0])); } catch (Exception ex) { TechnicalException te = new TechnicalException("Your pelsoft license has expired or is corrupted. Please contact your suppor or software provider", ex); te.Source = "Pelsoft Lic manager"; te.ErrorId = "100"; throw te; } chkExp(5, expTime); if (!String.IsNullOrEmpty(sn)) { chkAuthorization(sn); } }
public static void chk() { DateTime expTime = new DateTime(); string expk = "7gp6CZ+Y8BZULbjOOkT86vi8HnrtyaIQ6WiLhdY48jY=$PbUiRifcU1q8Egl96hC7tw=="; string l = string.Empty; string sn = string.Empty; try { if (Fwk.Configuration.ConfigurationManager.GetProperty("Engine", "lic") != null) { l = Fwk.Configuration.ConfigurationManager.GetProperty("Engine", "lic").ToString(); } if (string.IsNullOrEmpty(l)) { TechnicalException te = new TechnicalException("Your pelsoft license is corrupted. Please contact your suppor or software provider"); te.Source = "Pelsoft Lic mannager"; te.ErrorId = "100"; throw te; } FwkSymetricAlg a = new FwkSymetricAlg(expk); string[] decrypted = a.Dencrypt(l).Split('$'); string[] d = decrypted[1].Split('|'); sn = decrypted[0]; expTime = new DateTime(Convert.ToInt32(d[2]), Convert.ToInt32(d[1]), Convert.ToInt32(d[0])); } catch (Exception ex) { TechnicalException te = new TechnicalException("Your pelsoft license has expired or is corrupted. Please contact your suppor or software provider", ex); te.Source = "Pelsoft Lic mannager"; te.ErrorId = "100"; throw te; } chkExp(5, expTime); chkAuthorization(sn); }
public static void chk() { DateTime expTime = new DateTime(); string expk = "7gp6CZ+Y8BZULbjOOkT86vi8HnrtyaIQ6WiLhdY48jY=$PbUiRifcU1q8Egl96hC7tw=="; string l = string.Empty; string sn = string.Empty; try { if (Fwk.Configuration.ConfigurationManager.GetProperty("Engine", "lic") != null) l = Fwk.Configuration.ConfigurationManager.GetProperty("Engine", "lic").ToString(); if (string.IsNullOrEmpty(l)) { TechnicalException te = new TechnicalException("Your pelsoft license is corrupted. Please contact your suppor or software provider"); te.Source = "Pelsoft Lic mannager"; te.ErrorId = "100"; throw te; } FwkSymetricAlg a = new FwkSymetricAlg(expk); string[] decrypted = a.Dencrypt(l).Split('$'); string[] d = decrypted[1].Split('|'); sn= decrypted[0]; expTime = new DateTime(Convert.ToInt32(d[2]), Convert.ToInt32(d[1]), Convert.ToInt32(d[0])); } catch (Exception ex) { TechnicalException te = new TechnicalException("Your pelsoft license has expired or is corrupted. Please contact your suppor or software provider", ex); te.Source = "Pelsoft Lic mannager"; te.ErrorId = "100"; throw te; } chkExp(5, expTime); chkAuthorization(sn); }