[XML Security Suite]

DOMHASH implementation for SAX and DOM

This is a DOMHASH calculation package conforming to SAX and DOM. This does not depend on any SAX/DOM implementation.


How to use

This library requires JDK 1.1 (or later) and a SAX Parser or a DOM implementation.

For DOM

To get digest values, call getDigest(MessageDigest md, Node node) of com.ibm.dom.util.Digest class.

For SAX

Fig.1: Architecture
[Architecture]

Applications should implement NamespaceDocumentHandler. When an application want a digest value of an element, call DigestFilter#enable() with a MessageDigest instance in startElement() method for the target element. The application can get the digest value of the element with DigestFilter#getDigest() in endElement() method for the target element. See SAXSample.java.

When an application want a digest value of the root element, create a DigestFilter instance with DigestFilter(MessageDigest) constructor. and call Parser#parse() and DigestFilter#getDigest(). See SAXDigestTest.java.



TAMURA, Kent
Last modified: Mon Apr 12 19:02:25 JST 1999