public static BlobDescriptor computeDigest(WritableContents contents) throws IOException {
    return computeDigest(contents, ByteStreams.nullOutputStream());
  }
Computes the digest by consuming the contents.

@param contents the contents for which the digest is computed
@return computed digest and bytes consumed
@throws IOException if reading fails
jib-core/src/main/java/com/google/cloud/tools/jib/hash/Digests.java