code: public static boolean validatePassword(String password, String correctHash) throws NoSuchAlgorithmException, InvalidKeySpecException {
          return validatePassword(password.toCharArray(), correctHash);
      }
docs: Validates a password using a hash.
  
  @param password
  the password to check
  @param correctHash
  the hash of the valid password
  @return true if the password is correct, false if not
  @throws NoSuchAlgorithmException if jdk does not support the algorithm
  @throws InvalidKeySpecException if the password or salt are invalid