public static BlobDescriptor computeDigest(JsonTemplate template) throws IOException {
    return computeDigest(template, ByteStreams.nullOutputStream());
  }
Utility class for computing a digest for various inputs while optionally writing to an output
stream.
jib-core/src/main/java/com/google/cloud/tools/jib/hash/Digests.java