code: @Deprecated
    public String generateSecuredApiKey(String privateApiKey, String tagFilters, String userToken) throws NoSuchAlgorithmException, InvalidKeyException, AlgoliaException {
      if (!tagFilters.contains("="))
        return generateSecuredApiKey(privateApiKey, new Query().setTagFilters(tagFilters), userToken);
      else {
        if (userToken != null && userToken.length() > 0) {
          try {
            tagFilters = String.format("%s%s%s", tagFilters, "&userToken=", URLEncoder.encode(userToken, "UTF-8"));
          } catch (UnsupportedEncodingException e) {
            throw new AlgoliaException(e.getMessage());
          }
        }
        return Base64.encodeBase64String(String.format("%s%s", hmac(privateApiKey, tagFilters), tagFilters).getBytes(Charset.forName("UTF8")));
      }
    }
docs: Generate a secured and public API Key from a list of tagFilters and an
  optional user token identifying the current user
  
  @param privateApiKey your private API Key
  @param tagFilters    the list of tags applied to the query (used as security)
  @param userToken     an optional token identifying the current user
  @deprecated Use `generateSecuredApiKey(String privateApiKey, Query query, String userToken)` version