use of org.apache.axiom.om.util.DigestGenerator in project webservices-axiom by apache.
the class DigestTestCase method runTest.
@Override
protected final void runTest() throws Throwable {
OMInformationItem node = createInformationItem();
DigestGenerator digestGenerator = new DigestGenerator();
byte[] digest;
if (node instanceof OMDocument) {
digest = digestGenerator.getDigest((OMDocument) node, algorithm);
} else if (node instanceof OMAttribute) {
digest = digestGenerator.getDigest((OMAttribute) node, algorithm);
} else {
digest = digestGenerator.getDigest((OMNode) node, algorithm);
}
assertEquals(expectedDigest, DigestUtils.toHexString(digest));
}
Aggregations