Exemple #1
0
        /// <summary>
        /// 암호화된 json 파일로 로그인
        /// </summary>
        private void Encrypted()
        {
            BOrigin = File.ReadAllBytes(Global.Config.encryptpath);
            LoginWindow lw = new LoginWindow();

            lw.CheckPassword = CheckPassword1;
            if (lw.ShowDialog().Value)
            {
                try
                {
                    byte[] Decrypt = FileDecrypt.Decrypt(BOrigin, FilePassword.Default(lw.Password.Password));
                    string SOrigin = Encoding.UTF8.GetString(Decrypt);
                    Global.Password = lw.Password.Password;
                }
                catch { Environment.Exit(0); }
            }
        }
Exemple #2
0
        private bool CheckPassword1(string password)
        {
            bool @try = FileDecrypt.TryDecrypt(ref Decrypt, BOrigin, FilePassword.Default(password));

            return(@try);
        }