protected void Button1_Click(object sender, EventArgs e) { _AESEncryption aes = new _AESEncryption(); if (TextBox2.Text != "") { TextBox1.Text = aes.DecryptString(TextBox2.Text); } if (TextBox1.Text != "") { TextBox2.Text = aes.EncryptToString(TextBox1.Text); } }
public static string webmasterLogin() { string strValue = ""; try { _AESEncryption aes = new _AESEncryption(); strValue = aes.DecryptString(ConfigurationManager.AppSettings["webmasterLogin"]); } catch { } return(strValue.Trim()); }
public static string smtpServer_Password() { string strValue = ""; try { _AESEncryption aes = new _AESEncryption(); strValue = aes.DecryptString(ConfigurationManager.AppSettings["smtpServer_Password"]); } catch { } return(strValue.Trim()); }
//Web.config variables public static string conString() { string strValue = ""; try { _AESEncryption aes = new _AESEncryption(); string strPassword = aes.DecryptString(ConfigurationManager.AppSettings["conStringPassword"]); strValue = ConfigurationManager.AppSettings["conString"].Replace("~PASSWORD~", strPassword); } catch { } return(strValue.Trim()); }