code: public static byte[] getDigest(Resource<?> resource)
     {
        try
        {
           return getDigest(resource, MessageDigest.getInstance("MD5"));
        }
        catch (NoSuchAlgorithmException e)
        {
           throw new IllegalStateException("Error calculating digest for resource [" + resource.getFullyQualifiedName()
                    + "]", e);
        }
     }
docs: Returns the {@link Byte} array message digest of {@link #getResourceInputStream()} using the default MD5
  {@link MessageDigest}.