public class EncryptedDataImpl extends EncryptedTypeImpl implements EncryptedData
EncryptedData type which supports the
DOM XML processing and representation mechanism.DOMStructure.NodeWrappercipherData_, encoding_, encryptionMethod_, encryptionProperties_, id_, keyInfo_, keySelectorResult_, mimeType_, provider_, tbe_, type_implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALEDCONTENT, ELEMENT, XMLNS| Constructor and Description |
|---|
EncryptedDataImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
EncryptedDataImpl with the
specified context and node to unmarshal from. |
EncryptedDataImpl(ToBeEncrypted toBeEncrypted,
EncryptionMethodImpl encryptionMethod,
KeyInfo keyInfo,
EncryptionProperties encryptionProperties,
String id,
CipherReferenceImpl cipherReference)
Creates a new instance of this
EncryptedDataImpl with the
specified the to-be-encrypted data, the encryption method, the key info,
the encryption properties, the Id-attribute value and the
CipherReference. |
| Modifier and Type | Method and Description |
|---|---|
void |
decryptAndReplace(XMLDecryptContext context)
Decrypts the
CipherData in this EncryptedData and
replace the EncryptedData with the decrypted data or element. |
void |
encrypt(XMLEncryptContext context)
Encrypts the
ToBeEncrypted passed to the construction of this
EncryptedType and inserts it in the CipherValue
or CipherReference of the CipherData of this
EncryptedData. |
String |
getLocalName()
Returns the local name of the represented XML element.
|
decrypt, getChildStructures, getCipherData, getCipherText, getEncoding, getEncryptionMethod, getEncryptionProperties, getId, getKeyInfo, getMimeType, getToBeEncrypted, getType, marshalAttributes, marshalIDAttribute, putChildStructure, selectKey, unmarshalAttributesgetNamespace, initaddBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalElement, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecryptgetCipherData, getCipherText, getEncoding, getEncryptionMethod, getEncryptionProperties, getId, getKeyInfo, getMimeType, getToBeEncrypted, getTypeisFeatureSupportedpublic EncryptedDataImpl(DOMCryptoContext context, Node node) throws MarshalException
EncryptedDataImpl with the
specified context and node to unmarshal from.context - the contextnode - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingpublic EncryptedDataImpl(ToBeEncrypted toBeEncrypted, EncryptionMethodImpl encryptionMethod, KeyInfo keyInfo, EncryptionProperties encryptionProperties, String id, CipherReferenceImpl cipherReference)
EncryptedDataImpl with the
specified the to-be-encrypted data, the encryption method, the key info,
the encryption properties, the Id-attribute value and the
CipherReference.toBeEncrypted - the data to be encrypted in this EncryptedDataencryptionMethod - the encryption method (may be null)keyInfo - the key info (may be null)encryptionProperties - the encryption properties (may be null)id - the Id-attribute value (may be null)cipherReference - the CipherReference (may be null)IllegalArgumentException - if toBeEncrypted is not of type
ToBeEncryptedOctetStream or DOMToBeEncryptedXMLNullPointerException - if toBeEncrypted is nullpublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public void decryptAndReplace(XMLDecryptContext context) throws XMLEncryptionException
javax.xml.crypto.enc.EncryptedDataCipherData in this EncryptedData and
replace the EncryptedData with the decrypted data or element.decryptAndReplace in interface EncryptedDataXMLEncryptionExceptionEncryptedData.decryptAndReplace(javax.xml.crypto.enc.XMLDecryptContext)public void encrypt(XMLEncryptContext context) throws XMLEncryptionException, MarshalException
javax.xml.crypto.enc.EncryptedTypeToBeEncrypted passed to the construction of this
EncryptedType and inserts it in the CipherValue
or CipherReference of the CipherData of this
EncryptedData.encrypt in interface EncryptedTypecontext - The encryption context.XMLEncryptionException - if an error occurs while encrypting.MarshalException - if an error occurs while marshalling.EncryptedType.encrypt(javax.xml.crypto.enc.XMLEncryptContext)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC