code: public String getCanonicalRequest(String httpRequestMethod, String canonicalURI, String canonicalQueryString,
                                        String canonicalHeaders, String signedHeaders, String requestPayload) throws SignatureException {
          try {
              return httpRequestMethod + LINE_SEPARATOR + canonicalURI + LINE_SEPARATOR + canonicalQueryString + LINE_SEPARATOR +
                      canonicalHeaders + LINE_SEPARATOR + signedHeaders + LINE_SEPARATOR +
                      new String(Hex.encode(calculateHash(requestPayload)), ENCODING);
          } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
              throw new SignatureException(REQUEST_PAYLOAD_DIGEST + e.getMessage());
          }
      }
docs: Combines the inputs into a canonical (standardized format) request.
  This method requires the payload's hash pre-calculated.
  
  @param httpRequestMethod    Request method.
  @param canonicalURI         Request canonical URI.
  @param canonicalQueryString Request query string.
  @param canonicalHeaders     Canonical headers for the request. These headers will be signed.
  @param signedHeaders        Column separated list of header names that will be signed.
  @param requestPayload       Request payload's hash.
  @return A string representing the canonical request.