public class CipherDataImpl extends XencDOMStructure
CipherData element that supports the
DOM XML representation and processing mechanism.DOMStructure.NodeWrapper| Modifier and Type | Field and Description |
|---|---|
protected CipherReferenceImpl |
cipherReference_
The CipherReference.
|
protected byte[] |
cipherText_
Holds the cipher text in case a
CipherReference is used. |
protected CipherValueImpl |
cipherValue_
The CipherValue.
|
implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALED| Constructor and Description |
|---|
CipherDataImpl(CipherReferenceImpl cipherReference)
Creates a new instance of this
CipherDataImpl with the
specified cipher reference. |
CipherDataImpl(CipherValueImpl cipherValue)
Creates a new instance of this
CipherDataImpl with the
specified cipher data. |
CipherDataImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
CipherDataImpl with the
specified context and node to unmarshal from. |
| Modifier and Type | Method and Description |
|---|---|
protected List |
getChildStructures()
Returns the list of child structures of this
DOMStructure. |
CipherData |
getCipherData()
Returns the cipher data.
|
InputStream |
getCipherData(XMLDecryptContext context)
Gets the cipher data form this
CipherData. |
InputStream |
getCipherText()
Returns the encrypted data if this CipherData stores the encrypted data as
CipherReference.
|
String |
getLocalName()
Returns the local name of the represented XML element.
|
protected void |
putChildStructure(DOMStructure childStructure)
Put an unmarshalled child structure.
|
void |
setCipherText(byte[] value)
Sets the cipher value of this
CipherData. |
getNamespace, initaddBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalAttributes, marshalElement, marshalIDAttribute, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalAttributes, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNodeprotected CipherValueImpl cipherValue_
null if is null)protected CipherReferenceImpl cipherReference_
null if is null)protected byte[] cipherText_
CipherReference is used.public CipherDataImpl(DOMCryptoContext context, Node node) throws MarshalException
CipherDataImpl with the
specified context and node to unmarshal from.context - the contextnode - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingpublic CipherDataImpl(CipherReferenceImpl cipherReference)
CipherDataImpl with the
specified cipher reference.cipherReference - the cipher referenceNullPointerException - if cipherData is nullpublic CipherDataImpl(CipherValueImpl cipherValue)
CipherDataImpl with the
specified cipher data.cipherValue - the cipher dataNullPointerException - if cipherData is nullpublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public CipherData getCipherData()
public InputStream getCipherText()
IllegalStateException - if a CipherData is not a CipherReference; or this method is called
on a unmarshalled EncryptedType.public void setCipherText(byte[] value)
CipherData.value - the cipher valuepublic InputStream getCipherData(XMLDecryptContext context) throws XMLEncryptionException
CipherData.context - the contextXMLEncryptionException - if an unexpected exception occurs during dereferencing the
CipherReferenceprotected List getChildStructures()
DOMStructureDOMStructure.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
A subclass has to overwrite this method to return a list of
DOMStrucutres represented by this subclass.
getChildStructures in class DOMStructureDOMStructures (may be empty, but never
null)DOMStructure.getChildStructures()protected void putChildStructure(DOMStructure childStructure) throws MarshalException
DOMStructure
This method is called by
DOMStructure.unmarshalStructures(NodeList, DOMCryptoContext) for every
unmarshalled child structure.
A subclass has to overwrite this method to store the given child structure in its the corresponding field.
putChildStructure in class DOMStructurechildStructure - the unmarshalled child structureMarshalExceptionDOMStructure.putChildStructure(iaik.xml.crypto.dom.DOMStructure)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC