Package org.apache.juneau.commons.utils
Class ChecksumUtils
java.lang.Object
org.apache.juneau.commons.utils.ChecksumUtils
Content-checksum utility methods.
-
Method Summary
-
Method Details
-
hash8
Formats a CRC32 checksum of the specified bytes as a zero-padded, lower-case, 8-hex-char content hash.Suitable as a compact, content-sensitive cache-buster for classpath-shipped assets (JS/CSS/images, etc.): the hash changes the instant the underlying bytes do, without relying on a build/version string alone (which stays stable across
-SNAPSHOTdev rebuilds and so cannot bust a browser's cache on its own).- Parameters:
bytes- The bytes to checksum. Must not benull .- Returns:
- The zero-padded 8-hex-char CRC32 checksum (e.g.
"1a2b3c4d").
-