public static boolean isValidDigest(String digest) {
    return digest.matches(DescriptorDigest.DIGEST_REGEX);
  }
Returns {@code true} if {@code digest} is a valid digest string. For example, a valid digest
could be {@code sha256:868fd30a0e47b8d8ac485df174795b5e2fe8a6c8f056cc707b232d65b8a1ab68}.

@param digest the digest to check
@return {@code true} if is a valid digest; {@code false} otherwise
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java