code: protected static Collection<String> parseDigestHeader(final String digest) throws UnsupportedAlgorithmException {
          try {
              final Map<String, String> digestPairs = RFC3230_SPLITTER.split(nullToEmpty(digest));
              final boolean allSupportedAlgorithms = digestPairs.keySet().stream().allMatch(
                  ContentDigest.DIGEST_ALGORITHM::isSupportedAlgorithm);
  
              // If you have one or more digests that are all valid or no digests.
              if (digestPairs.isEmpty() || allSupportedAlgorithms) {
                  return digestPairs.entrySet().stream()
                      .filter(entry -> ContentDigest.DIGEST_ALGORITHM.isSupportedAlgorithm(entry.getKey()))
                      .map(entry -> ContentDigest.asURI(entry.getKey(), entry.getValue()).toString())
                      .collect(Collectors.toSet());
              } else {
                  throw new UnsupportedAlgorithmException(String.format("Unsupported Digest Algorithim: %1$s", digest));
              }
          } catch (final RuntimeException e) {
              if (e instanceof IllegalArgumentException) {
                  throw new ClientErrorException("Invalid Digest header: " + digest + "\n", BAD_REQUEST);
              }
              throw e;
          }
      }
docs: Parse the RFC-3230 Digest response header value. Look for a sha1 checksum and return it as a urn, if missing or
  malformed an empty string is returned.
  
  @param digest The Digest header value
  @return the sha1 checksum value
  @throws UnsupportedAlgorithmException if an unsupported digest is used