|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.c14n.Canonicalizer
public abstract class Canonicalizer
Abstract base class for canonicalization implementations.
Field Summary | |
---|---|
protected java.lang.String |
algorithmURI The algorithmURI for this |
protected XSAlgorithmIdentifier |
c14nMethod The XSAlgorithmIdentifier instance used to instantiate this Canonicalizer . |
Constructor Summary | |
---|---|
protected |
Canonicalizer() Creates a new Canonicalizer instance. |
protected |
Canonicalizer(XSAlgorithmIdentifier c14nMethod) Creates a new Canonicalizer instance, and checks that the given XSAlgorithmIdentifier is a XML-DSIG CanonicalizationMethod element. |
Method Summary | |
---|---|
abstract byte[] |
canonicalize(java.util.Collection source) Canonicalizes the given Collection , returning the resulting XML octets in UTF-8 encoding. |
abstract byte[] |
canonicalize(org.xml.sax.InputSource source) Canonicalizes the XML in the given InputSource , returning the resulting XML octets in UTF-8 encoding. |
abstract byte[] |
canonicalize(java.io.InputStream source) Canonicalizes the XML in the given input stream, returning the resulting XML octets in UTF-8 encoding. |
abstract byte[] |
canonicalize(java.io.InputStream source, java.lang.String systemId) Canonicalizes the XML in the given input stream, returning the resulting XML octets in UTF-8 encoding. |
abstract byte[] |
canonicalize(org.w3c.dom.Node source) Canonicalizes a DOM subtree rooted in the given Node , returning the resulting XML octets in UTF-8 encoding. |
abstract byte[] |
canonicalize(org.w3c.dom.NodeList source) Canonicalizes the given NodeList , returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(java.util.Collection source) Canonicalizes the given Collection , returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(org.xml.sax.InputSource source) Canonicalizes the XML in the given InputSource , returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(java.io.InputStream source) Canonicalizes the XML in the given input stream, returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(java.io.InputStream source, java.lang.String systemId) Canonicalizes the XML in the given input stream, returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(org.w3c.dom.Node source) Canonicalizes a DOM subtree rooted in the given Node , returning the resulting XML octets in UTF-8 encoding. |
java.io.InputStream |
canonicalizeToStream(org.w3c.dom.NodeList source) Canonicalizes the given NodeList , returning the resulting XML octets in UTF-8 encoding. |
java.lang.String |
getAlgorithURI() Return the algorithm URI |
XSAlgorithmIdentifier |
getC14NMethod() Returns the XSAlgorithmIdentifier containing the CanonicalizationMethod element used to instantiate this Canonicalizer . |
java.lang.String |
getInclusiveNSPrefixList() Returns the value of the InclusiveNamespaces parameter's PrefixList attribute. |
static Canonicalizer |
getInstance(boolean inclusive, boolean withComments) |
static Canonicalizer |
getInstance(boolean inclusive, boolean withComments, boolean c14n11) |
static Canonicalizer |
getInstance(java.lang.String uri) Creates a new Canonicalizer implementation class identified by the given algorithm URI. |
static Canonicalizer |
getInstance(XSAlgorithmIdentifier c14nMethod) Returns an instance of the Canonicalizer subclass identified by the given XSAlgorithmIdentifier 's Algorithm attribute. |
void |
setInclusiveNSPrefixList(java.lang.String nsPrefixList) Sets the value of the InclusiveNamespaces parameter's PrefixList attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected XSAlgorithmIdentifier c14nMethod
XSAlgorithmIdentifier
instance used to instantiate this Canonicalizer
.protected java.lang.String algorithmURI
Constructor Detail |
---|
protected Canonicalizer()
Canonicalizer
instance.protected Canonicalizer(XSAlgorithmIdentifier c14nMethod)
Canonicalizer
instance, and checks that the given XSAlgorithmIdentifier
is a XML-DSIG CanonicalizationMethod element. Subclasses should invoke this constructor as needed.
c14nMethod
- A XSAlgorithmIdentifier
with local tag name "CanonicalizationMethod".java.lang.IllegalArgumentException
- If the given XSAlgorithmIdentifier
is not a XML-DSIG CanonicalizationMethod.Method Detail |
---|
public XSAlgorithmIdentifier getC14NMethod()
XSAlgorithmIdentifier
containing the CanonicalizationMethod element used to instantiate this Canonicalizer
.XSAlgorithmIdentifier
, or null
if none has been set.public java.lang.String getAlgorithURI()
public static Canonicalizer getInstance(XSAlgorithmIdentifier c14nMethod) throws oracle.security.crypto.core.AlgorithmIdentifierException
Canonicalizer
subclass identified by the given XSAlgorithmIdentifier
's Algorithm attribute.c14nMethod
- A XSAlgorithmIdentifier
object containing the algorithm identifying the desired canonicalization, and any parameters required by the algorithm. If any parameters are specified in the XSAlgorithmIdentifier
structure, the algorithm's target implementation class must have an accessible constructor taking a XSAlgorithmIdentifier
as its only argument.oracle.security.crypto.core.AlgorithmIdentifierException
- If a Canonicalizer
cannot be instantiated for the given algorithm.java.lang.IllegalArgumentException
- If the given XSAlgorithmIdentifier
is not a CanonicalizationMethod or it contains more than one parameter.public static Canonicalizer getInstance(java.lang.String uri) throws oracle.security.crypto.core.AlgorithmIdentifierException
Canonicalizer
implementation class identified by the given algorithm URI.
Standard algorithm URI constants can be found in XMLURI
, including:
uri
- A URI string identifying the algorithm of the canonicalization implementation class to be instantiated.oracle.security.crypto.core.AlgorithmIdentifierException
- If a Canonicalizer
cannot be instantiated for the given algorithm.public static Canonicalizer getInstance(boolean inclusive, boolean withComments)
public static Canonicalizer getInstance(boolean inclusive, boolean withComments, boolean c14n11)
public void setInclusiveNSPrefixList(java.lang.String nsPrefixList)
public java.lang.String getInclusiveNSPrefixList()
public abstract byte[] canonicalize(org.w3c.dom.Node source) throws CanonicalizationException
Node
, returning the resulting XML octets in UTF-8 encoding.source
- An org.w3c.dom.Node
at the root of a XML tree to be canonicalized.CanonicalizationException
public java.io.InputStream canonicalizeToStream(org.w3c.dom.Node source) throws CanonicalizationException
Node
, returning the resulting XML octets in UTF-8 encoding.source
- An org.w3c.dom.Node
at the root of a XML tree to be canonicalized.CanonicalizationException
public abstract byte[] canonicalize(org.w3c.dom.NodeList source) throws CanonicalizationException
NodeList
, returning the resulting XML octets in UTF-8 encoding.source
- An org.w3c.dom.NodeList
to be canonicalized.CanonicalizationException
public java.io.InputStream canonicalizeToStream(org.w3c.dom.NodeList source) throws CanonicalizationException
NodeList
, returning the resulting XML octets in UTF-8 encoding.source
- An org.w3c.dom.NodeList
to be canonicalized.CanonicalizationException
public abstract byte[] canonicalize(java.util.Collection source) throws CanonicalizationException
Collection
, returning the resulting XML octets in UTF-8 encoding.source
- A java.util.Collection
containing the nodes to be canonicalized.CanonicalizationException
public java.io.InputStream canonicalizeToStream(java.util.Collection source) throws CanonicalizationException
Collection
, returning the resulting XML octets in UTF-8 encoding.source
- A java.util.Collection
containing the nodes to be canonicalized.CanonicalizationException
public abstract byte[] canonicalize(java.io.InputStream source) throws CanonicalizationException
source
- A java.io.InputStream
containing the XML to be canonicalized.CanonicalizationException
public java.io.InputStream canonicalizeToStream(java.io.InputStream source) throws CanonicalizationException
source
- A java.io.InputStream
containing the XML to be canonicalized.CanonicalizationException
public abstract byte[] canonicalize(java.io.InputStream source, java.lang.String systemId) throws CanonicalizationException
source
- A java.io.InputStream
containing the XML to be canonicalized.systemId
- A URI string identifying the input stream source.CanonicalizationException
public java.io.InputStream canonicalizeToStream(java.io.InputStream source, java.lang.String systemId) throws CanonicalizationException
source
- A java.io.InputStream
containing the XML to be canonicalized.systemId
- A URI string identifying the input stream source.CanonicalizationException
public abstract byte[] canonicalize(org.xml.sax.InputSource source) throws CanonicalizationException
InputSource
, returning the resulting XML octets in UTF-8 encoding.source
- An org.xml.sax.InputSource
containing the XML to be canonicalized.CanonicalizationException
public java.io.InputStream canonicalizeToStream(org.xml.sax.InputSource source) throws CanonicalizationException
InputSource
, returning the resulting XML octets in UTF-8 encoding.source
- An org.xml.sax.InputSource
containing the XML to be canonicalized.CanonicalizationException
|
Oracle Security Developer Tools XML Security Java API Reference 11g (11.1.1) E10680-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |