示例#1
0
        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);
            }
        }
示例#2
0
        public static string webmasterLogin()
        {
            string strValue = "";

            try
            {
                _AESEncryption aes = new _AESEncryption();
                strValue = aes.DecryptString(ConfigurationManager.AppSettings["webmasterLogin"]);
            }
            catch
            {
            }
            return(strValue.Trim());
        }
示例#3
0
        public static string smtpServer_Password()
        {
            string strValue = "";

            try
            {
                _AESEncryption aes = new _AESEncryption();
                strValue = aes.DecryptString(ConfigurationManager.AppSettings["smtpServer_Password"]);
            }
            catch
            {
            }
            return(strValue.Trim());
        }
示例#4
0
        //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());
        }