@Override
  public boolean verifyServerHostKey(
      String hostname, int port, String serverHostKeyAlgorithm, byte[] serverHostKey)
      throws Exception {

    String fingerPrint = KnownHosts.createHexFingerprint(serverHostKeyAlgorithm, serverHostKey);
    int fingerPrintStatus = Constraints.FINGER_PRINT_CHANGED;

    if (profile.getFingerPrintType() == null || profile.getFingerPrintType().equals("")) {
      fingerPrintStatus = Constraints.FINGER_PRINT_INIITIALIZE;
      reason = getString(R.string.finger_print_unknown);

    } else {

      if (profile.getFingerPrintType().equals(serverHostKeyAlgorithm)
          && profile.getFingerPrint() != null
          && profile.getFingerPrint().equals(fingerPrint)) {
        return true;
      } else {
        fingerPrintStatus = Constraints.FINGER_PRINT_CHANGED;
        reason = getString(R.string.finger_print_mismatch);
      }
    }

    Log.d(TAG, "Finger Print: " + profile.getFingerPrint());
    Log.d(TAG, "Finger Print Type: " + profile.getFingerPrintType());

    Bundle bundle = new Bundle();
    bundle.putInt(Constraints.ID, profile.getId());
    bundle.putInt(Constraints.FINGER_PRINT_STATUS, fingerPrintStatus);
    bundle.putString(Constraints.FINGER_PRINT, fingerPrint);
    bundle.putString(Constraints.FINGER_PRINT_TYPE, serverHostKeyAlgorithm);

    Message msg = new Message();
    msg.setData(bundle);

    hostKeyHandler.sendMessage(msg);

    synchronized (fingerPrintLock) {
      fingerPrintLock.wait();
    }

    return fingerPrintChecker;
  }