public class CipherValueImpl extends XencDOMStructure implements CipherValue
CipherValue element that supports the
DOM XML representation processing mechanism.DOMStructure.NodeWrapperimplMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALED| Constructor and Description |
|---|
CipherValueImpl()
Creates a new instance of this
CipherValueImpl. |
CipherValueImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
CipherValueImpl with the
specified context and node to unmarshal from. |
CipherValueImpl(InputStream cipherValueStream)
Creates a new instance of this
CipherValueImpl with the
specified input stream providing the cipher value. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendValue(DOMCryptoContext context,
byte[] value)
Appends the given cipher value.
|
String |
getLocalName()
Returns the local name of the represented XML element.
|
byte[] |
getValue()
Returns the encrypted data.
|
InputStream |
getValueStream()
Returns the raw value as InputStream.
|
protected Element |
marshalElement(DOMCryptoContext context,
Node parent,
Node nextSibling)
Marshals the XML representation of the
Element represented by this
DOMStructure and returns it. |
void |
setValue(byte[] value)
Sets the value of this
CipherValue. |
protected void |
unmarshalElement(DOMCryptoContext context,
Element element)
Unmarshals the given
element. |
getNamespace, initaddBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructures, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalAttributes, marshalIDAttribute, newIDforLookUp, putChildStructure, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalAttributes, unmarshalIDAttribute, unmarshalStructures, wrapNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFeatureSupportedpublic CipherValueImpl(DOMCryptoContext context, Node node) throws MarshalException
CipherValueImpl with the
specified context and node to unmarshal from.context - the contextnode - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingpublic CipherValueImpl()
CipherValueImpl.public CipherValueImpl(InputStream cipherValueStream)
CipherValueImpl with the
specified input stream providing the cipher value.cipherValueStream - the input stream providing the cipher valueNullPointerException - if cipherValueStream is nullIllegalArgumentException - if cipherValueStream cannot be read frompublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public byte[] getValue()
javax.xml.crypto.enc.CipherValuegetValue in interface CipherValueCipherValue.getValue()public void setValue(byte[] value)
CipherValue.value - the cipher valuepublic InputStream getValueStream()
null if no value is
present.protected Element marshalElement(DOMCryptoContext context, Node parent, Node nextSibling) throws MarshalException
DOMStructureElement represented by this
DOMStructure and returns it.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
marshalElement in class DOMStructurecontext - the marshal contextparent - where to place the marshalled elementnextSibling - before which to place the marshalled nodeElementMarshalException - if an exception occurs during marshalingDOMStructure.marshalElement(DOMCryptoContext,
Node, Node)protected void unmarshalElement(DOMCryptoContext context, Element element) throws MarshalException
DOMStructureelement.
This method is called by DOMStructure.unmarshal(DOMCryptoContext).
A subclass has to overwrite this method to perform any special unmarshaling required.
unmarshalElement in class DOMStructurecontext - the marshal contextelement - the element to be unmarshalMarshalException - if an exception occurs during unmarshalingDOMStructure.unmarshalElement(javax.xml.crypto.dom.DOMCryptoContext,
org.w3c.dom.Element)public void appendValue(DOMCryptoContext context, byte[] value) throws MarshalException
context - the contextvalue - the raw cipher valueMarshalException - if an exception occurs during marshaling© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC