public class DOMHASHGenerator extends Object implements DigestGenerator
Modifier and Type | Field and Description |
---|---|
static String |
MD5_DIGEST_ALGORITHM
String representing the MD5 digest algorithm
|
static String |
SHA_DIGEST_ALGORITHM
String representing the SHA digest algorithm
|
static String |
SHA1_DIGEST_ALGORITHM
String representing the SHA1 digest algorithm
|
Constructor and Description |
---|
DOMHASHGenerator() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareOMAttribute(org.apache.axiom.om.OMAttribute attribute,
org.apache.axiom.om.OMAttribute comparingAttribute,
String digestAlgorithm)
Compares two OMAttributes for the XML equality
|
boolean |
compareOMDocument(org.apache.axiom.om.OMDocument document,
org.apache.axiom.om.OMDocument comparingDocument,
String digestAlgorithm)
Compares two OMDocuments for the XML equality
|
boolean |
compareOMNode(org.apache.axiom.om.OMNode node,
org.apache.axiom.om.OMNode comparingNode,
String digestAlgorithm)
Compares two OMNodes for the XML equality
|
Collection |
getAttributesWithoutNS(org.apache.axiom.om.OMElement element)
Gets the collection of attributes which are none namespace declarations for an OMElement
sorted according to the expanded names of the attributes
|
String |
getDigest(org.apache.axis2.context.MessageContext msgContext)
This is the implementation of the getDigest method and will implement the DOMHASH
algorithm based XML node identifications.
|
byte[] |
getDigest(org.apache.axiom.om.OMAttribute attribute,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMAttribute
|
byte[] |
getDigest(org.apache.axiom.om.OMDocument document,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMDocument
|
byte[] |
getDigest(org.apache.axiom.om.OMElement element,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMElement
|
byte[] |
getDigest(org.apache.axiom.om.OMNode node,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMNode
|
byte[] |
getDigest(org.apache.axiom.om.OMProcessingInstruction pi,
String digestAlgorithm)
This method is an overloaded method for the digest generation for OMProcessingInstruction
|
byte[] |
getDigest(org.apache.axiom.om.OMText text,
String digestAlgorithm)
This method is an overloaded method for the digest generation for OMText
|
String |
getExpandedName(org.apache.axiom.om.OMAttribute attribute)
This is an overloaded method for getting the expanded name as namespaceURI followed by
the local name for OMAttribute
|
String |
getExpandedName(org.apache.axiom.om.OMElement element)
This is an overloaded method for getting the expanded name as namespaceURI followed by
the local name for OMElement
|
String |
getStringRepresentation(byte[] array)
Gets the String representation of the byte array
|
Collection |
getValidElements(org.apache.axiom.om.OMDocument document)
Gets the valid element collection of an OMDocument.
|
public static final String MD5_DIGEST_ALGORITHM
public static final String SHA_DIGEST_ALGORITHM
public static final String SHA1_DIGEST_ALGORITHM
public String getDigest(org.apache.axis2.context.MessageContext msgContext) throws CachingException
getDigest
in interface DigestGenerator
msgContext
- - MessageContext on which the XML node identifier will be generatedCachingException
- if there is an error in generating the digest key
#getDigest(org.apache.axis2.context.MessageContext)public byte[] getDigest(org.apache.axiom.om.OMNode node, String digestAlgorithm) throws CachingException
node
- - OMNode to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an error in generating the digestpublic byte[] getDigest(org.apache.axiom.om.OMDocument document, String digestAlgorithm) throws CachingException
document
- - OMDocument to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an io error or the specified algorithm is incorrectpublic byte[] getDigest(org.apache.axiom.om.OMElement element, String digestAlgorithm) throws CachingException
element
- - OMElement to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an io error or the specified algorithm is incorrectpublic byte[] getDigest(org.apache.axiom.om.OMProcessingInstruction pi, String digestAlgorithm) throws CachingException
pi
- - OMProcessingInstruction to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding
is not supported by the processorpublic byte[] getDigest(org.apache.axiom.om.OMAttribute attribute, String digestAlgorithm) throws CachingException
attribute
- - OMAttribute to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding
is not supported by the processorpublic byte[] getDigest(org.apache.axiom.om.OMText text, String digestAlgorithm) throws CachingException
text
- - OMText to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding
is not supported by the processorpublic String getExpandedName(org.apache.axiom.om.OMElement element)
element
- - OMElement of which the expanded name is retrievedpublic String getExpandedName(org.apache.axiom.om.OMAttribute attribute)
attribute
- - OMAttribute of which the expanded name is retrievedpublic Collection getAttributesWithoutNS(org.apache.axiom.om.OMElement element)
element
- - OMElement of which the none ns declaration attributes to be retrievedpublic Collection getValidElements(org.apache.axiom.om.OMDocument document)
document
- - OMDocument of which the valid elements to be retrievedpublic String getStringRepresentation(byte[] array)
array
- - byte[] of which the String representation is requiredpublic boolean compareOMNode(org.apache.axiom.om.OMNode node, org.apache.axiom.om.OMNode comparingNode, String digestAlgorithm) throws CachingException
node
- - OMNode to be comparedcomparingNode
- - OMNode to be compareddigestAlgorithm
- - digest algorithm as a String to be used in the comparisonCachingException
- if there is an error in generating the digest keypublic boolean compareOMDocument(org.apache.axiom.om.OMDocument document, org.apache.axiom.om.OMDocument comparingDocument, String digestAlgorithm) throws CachingException
document
- - OMDocument to be comparedcomparingDocument
- - OMDocument to be compareddigestAlgorithm
- - digest algorithm as a String to be used in the comparisonCachingException
- if there is an error in generating the digest keypublic boolean compareOMAttribute(org.apache.axiom.om.OMAttribute attribute, org.apache.axiom.om.OMAttribute comparingAttribute, String digestAlgorithm) throws CachingException
attribute
- - OMAttribute to be comparedcomparingAttribute
- - OMAttribute to be compareddigestAlgorithm
- - digest algorithm as a String to be used in the comparisonCachingException
- if there is an error in generating the digest keyCopyright © 2017 WSO2. All rights reserved.