public Optional<String> getDigest() {
    return Optional.ofNullable(digest);
  }
Gets the digest portion of the {@link ImageReference}.

@return the optional digest
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java