public static String buildEtagHash ( final String identifier , final Instant modified , final Prefer prefer ) { final String sep = "." ; final String hash = prefer != null ? prefer . getInclude ( ) . hashCode ( ) + sep + prefer . getOmit ( ) . hashCode ( ) : "" ; return md5Hex ( modified . toEpochMilli ( ) + sep + modified . getNano ( ) + sep + hash + sep + identifier ) ; }
Build a hash value suitable for generating an ETag .