Package org.iirds.dita.ot.plugin.module
Class ContentHashBuilder
java.lang.Object
org.iirds.dita.ot.plugin.module.ContentHashBuilder
Generate a hash value of XML content
- Author:
- Martin Kreutzer, Empolis Information Management GmbH
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates a hash of the content of an element.getSortedAttributes(Element element) protected voidupdate(MessageDigest md, String text) protected voidupdate(MessageDigest md, Node root)
-
Field Details
-
excludeAttributes
-
-
Constructor Details
-
ContentHashBuilder
public ContentHashBuilder()
-
-
Method Details
-
getHash
Generates a hash of the content of an element. Some technical attribute (xtrc, xtrf, xnlns:dita-ot), XML comments, and XML processing instructions are not taken into account. Implementation uses SHA-256.- Parameters:
element- the element for which to generate a hash- Returns:
- the hash (hex-encoded)
-
update
-
getSortedAttributes
-
update
-