private void butOK_Click(object sender, EventArgs e)
 {
     if (PrefC.GetString(PrefName.CentralManagerPassHash) != Userods.EncryptPassword(textPassword.Text))
     {
         MessageBox.Show("Bad password.");
         return;
     }
     DialogResult = DialogResult.OK;
 }
Example #2
0
 private void butOK_Click(object sender, EventArgs e)
 {
     if (textAccessCode.Text != "I'm admin")
     {
         MessageBox.Show("Access code is incorrect.");
         return;
     }
     Prefs.UpdateString(PrefName.CentralManagerPassHash, Userods.EncryptPassword(textPassword.Text));
     Prefs.RefreshCache();
     DialogResult = DialogResult.OK;
 }
Example #3
0
        public string MD5Encrypt(string inputPass)
        {
            /*
             *              byte[] unicodeBytes=Encoding.Unicode.GetBytes(inputPass);
             *              HashAlgorithm algorithm=MD5.Create();
             *              byte[] hashbytes2=algorithm.ComputeHash(unicodeBytes);
             *              return Convert.ToBase64String(hashbytes2);
             */
            String salt = "saturn";

            return(Userods.EncryptPassword(inputPass + salt, false));
        }
 private void butOK_Click(object sender, EventArgs e)
 {
     Prefs.UpdateString(PrefName.CentralManagerPassHash, Userods.EncryptPassword(textPassword.Text));
     Prefs.RefreshCache();
     DialogResult = DialogResult.OK;
 }