code: public String generateSecuredApiKey(String privateApiKey, Query query) throws NoSuchAlgorithmException, InvalidKeyException {
      return generateSecuredApiKey(privateApiKey, query, null);
    }
docs: Generate a secured and public API Key from a query and an
  optional user token identifying the current user
  
  @param privateApiKey your private API Key
  @param query         contains the parameter applied to the query (used as security)