code: public static URI asURI(final String algorithm, final String value) {
          try {
              final String scheme = DIGEST_ALGORITHM.getScheme(algorithm);
  
              return new URI(scheme, value, null);
          } catch (final URISyntaxException unlikelyException) {
              LOGGER.warn("Exception creating checksum URI: {}",
                                 unlikelyException);
              throw new RepositoryRuntimeException(unlikelyException);
          }
      }
docs: Convert a MessageDigest algorithm and checksum value to a URN
  @param algorithm the message digest algorithm
  @param value the checksum value
  @return URI