private void BtnChangePassword_Click(object sender, RoutedEventArgs e) { if (DuckPassword.verifyPassword(CurrentPasswordBox.Password)) { if (Equals(NewPassword1Box.Password, NewPassword2Box.Password)) { if (DuckPassword.CheckPassword(NewPassword1Box.Password)) { SQLiteClass sql = new SQLiteClass(); sql.ChangePassword(DuckPassword.PBKDF2HashPassword(NewPassword1Box.Password)); ErrorPassword.Content = "Success!"; } else { ErrorPassword.Content = "Password too short"; } } else { ErrorPassword.Content = "Passwords do not match"; } } else { ErrorPassword.Content = "Incorrect Password"; } }