Ejemplo n.º 1
0
        private void LoginButton(object sender, EventArgs e)
        {
            string hash = RegistryHelper.GetKey("Password");
            var    tmp  = Crypto.Verify(MasterPassword.Text, hash);

            switch (tmp)
            {
            case true:
                DialogResult = DialogResult.OK;
                break;

            default:
                this.Close();
                break;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks if the account database is valid based upon the md5 stored in the registry
 /// </summary>
 /// <param name="fileName">Location of the account database</param>
 /// <returns>True</returns>
 public static bool IsDatabaseValid(string fileName)
 {
     return((RegistryHelper.GetKey("MD5") == CalculateMD5(RegistryHelper.Zipfile)) ? true : false);
 }