Example #1
0
        /// <summary>
        /// 解密
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DesButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(this.MGNPWD.Text))
                {
                    MessageHelper.ShowWarn("管理密码不能为空");
                    return;
                }


                if (appAccountMgn.MGNPWD != this.MGNPWD.Text)
                {
                    MessageHelper.ShowWarn("管理密码不正确");
                    return;
                }
                else
                {
                    //string iv = this.ACCOUNT.Text.PadLeft(8, 'u');
                    string des = DesHelper.DESDecrypt(appAccountMgn.ENCPWD, key, iv);
                    this.InputPwd.Text         = des;
                    this.InputPwd.PasswordChar = new char();

                    downTime             = 60;
                    timer1.Enabled       = true;
                    this.timer1.Interval = 1000;
                    this.timer1.Tick    += DownTimeHide;
                    this.timer1.Start();
                }
            }
            catch (Exception ex)
            {
                MessageHelper.ShowError(ex);
            }
        }