|
XML Security, 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xml.enc.dom.DOMStructure
com.ibm.xml.enc.dom.DOMEncryptedData
public final class DOMEncryptedData
| Field Summary |
|---|
| Fields inherited from interface javax.xml.crypto.enc.EncryptedType |
|---|
CONTENT, ELEMENT, XMLNS |
| Constructor Summary | |
|---|---|
DOMEncryptedData(org.w3c.dom.Element encDataElem,
XMLCryptoContext context)
Creates a DOMEncryptedData from XML. |
|
DOMEncryptedData(java.lang.String id,
java.lang.String type,
java.lang.String mimeType,
java.lang.String encoding,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMCipherData cdata,
DOMEncryptionProperties ep,
org.w3c.dom.Element localEncDataElem)
|
|
DOMEncryptedData(ToBeEncrypted toBeEncrypted,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMEncryptionProperties eps,
java.lang.String id)
Creates a DOMEncryptedData from the specified components. |
|
DOMEncryptedData(ToBeEncrypted toBeEncrypted,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMEncryptionProperties eps,
java.lang.String id,
DOMCipherReference cipherRef)
Creates a DOMEncryptedData from the specified components. |
|
| Method Summary | |
|---|---|
static java.util.Hashtable |
collectNamespaceNodesInAncestors(org.w3c.dom.Node startNode,
boolean useProxy)
|
static java.util.Hashtable |
collectXMLPrefixAttributesInAncestors(org.w3c.dom.Node startNode)
|
java.io.InputStream |
decrypt(XMLDecryptContext decryptContext)
Decrypts the CipherData in this EncryptedData. |
void |
decryptAndReplace(XMLDecryptContext decryptContext)
Decrypts the CipherData in this EncryptedData and replace
the EncryptedData with the decrypted data or element |
void |
encrypt(XMLEncryptContext encryptContext)
Encrypts the ToBeEncrypted passed to the construction of this EncryptedType and inserts it in the CipherValue or CipherReference of the CipherData of this
EncryptedData. |
boolean |
equals(java.lang.Object o)
|
CipherData |
getCipherData()
Returns the cipher data containing the encrypted data. |
java.io.InputStream |
getCipherText()
Returns the encrypted data if the EncryptedType stores the encrypted data as CipherReference. |
java.lang.String |
getEncoding()
Returns a URI identifying the transfer encoding of the data that has been encrypted. |
EncryptionMethod |
getEncryptionMethod()
Returns the encryption method applied to the cipher data. |
EncryptionProperties |
getEncryptionProperties()
Returns the encryption properties associated with this encrypted type. |
java.lang.String |
getId()
Returns the optional ID. |
KeyInfo |
getKeyInfo()
Returns the key info that carries information about the key used to encrypt the data. |
java.lang.String |
getMimeType()
Returns the mime type of the data that has been encrypted. |
ToBeEncrypted |
getToBeEncrypted()
Returns the data to be encrypted if there is any |
java.lang.String |
getType()
Returns a URI identifying the type of the plaintext form of the encrypted content. |
void |
marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
java.lang.String encPrefix,
DOMCryptoContext context)
|
void |
marshal(org.w3c.dom.Node parent,
java.lang.String encPrefix,
DOMCryptoContext context)
|
(package private) static void |
serializeNode(org.w3c.dom.Node topNode,
org.w3c.dom.Node node,
org.w3c.dom.Node exceptedNode,
boolean withComments,
boolean xmlAttributes,
java.io.Writer wr)
|
| Methods inherited from class com.ibm.xml.enc.dom.DOMStructure |
|---|
isFeatureSupported |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.xml.crypto.XMLStructure |
|---|
isFeatureSupported |
| Constructor Detail |
|---|
public DOMEncryptedData(ToBeEncrypted toBeEncrypted,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMEncryptionProperties eps,
java.lang.String id)
DOMEncryptedData from the specified components.
em - the EncryptionMethodki - the KeyInfo, or null if not specifiedeps - the EncryptionProperties or null
if not specified.id - an optional id (specify null to omit)type - an optional Type (specify null to omit)mimeType - an optional MimeType (specify null to
omit)encoding - an option Encoding (specify null to omit)
public DOMEncryptedData(ToBeEncrypted toBeEncrypted,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMEncryptionProperties eps,
java.lang.String id,
DOMCipherReference cipherRef)
DOMEncryptedData from the specified components.
em - the EncryptionMethodki - the KeyInfo, or null if not specifiedeps - the EncryptionProperties or null
if not specified.cipherReference - a cipherReference
public DOMEncryptedData(org.w3c.dom.Element encDataElem,
XMLCryptoContext context)
throws MarshalException
DOMEncryptedData from XML.
encDataElem - EncryptedData element
MarshalException - if EncryptedData cannot be unmarshalled
public DOMEncryptedData(java.lang.String id,
java.lang.String type,
java.lang.String mimeType,
java.lang.String encoding,
DOMEncryptionMethod em,
DOMKeyInfo ki,
DOMCipherData cdata,
DOMEncryptionProperties ep,
org.w3c.dom.Element localEncDataElem)
throws MarshalException
MarshalException| Method Detail |
|---|
public java.lang.String getId()
EncryptedTypeID.
getId in interface EncryptedTypeID, or null if not specifiedpublic java.lang.String getType()
EncryptedType
getType in interface EncryptedTypenull if not specifiedpublic java.lang.String getMimeType()
EncryptedType
getMimeType in interface EncryptedTypenull if not specifiedpublic java.lang.String getEncoding()
EncryptedType
getEncoding in interface EncryptedTypenull if not specifiedpublic EncryptionMethod getEncryptionMethod()
EncryptedType
getEncryptionMethod in interface EncryptedTypenull if not specifiedpublic KeyInfo getKeyInfo()
EncryptedType
getKeyInfo in interface EncryptedTypenull if not specifiedpublic CipherData getCipherData()
EncryptedType
getCipherData in interface EncryptedTypenull if the data is a CipherValue
and the data has not been encrypted yetpublic EncryptionProperties getEncryptionProperties()
EncryptedType
getEncryptionProperties in interface EncryptedTypenull if not specifiedpublic java.io.InputStream getCipherText()
getCipherText in interface EncryptedTypejava.lang.IllegalStateException - - if a CipherData is not a CipherReference; or this method is called on a unmarshalled EncryptedTypepublic ToBeEncrypted getToBeEncrypted()
EncryptedType
getToBeEncrypted in interface EncryptedType
public void marshal(org.w3c.dom.Node parent,
java.lang.String encPrefix,
DOMCryptoContext context)
throws MarshalException
marshal in class DOMStructureMarshalException
public void marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
java.lang.String encPrefix,
DOMCryptoContext context)
throws MarshalException
MarshalException
public void decryptAndReplace(XMLDecryptContext decryptContext)
throws XMLEncryptionException
EncryptedDataCipherData in this EncryptedData and replace
the EncryptedData with the decrypted data or element
decryptAndReplace in interface EncryptedDatadecryptContext - the decryption context
XMLEncryptionException - if an error occurs while decrypting
public java.io.InputStream decrypt(XMLDecryptContext decryptContext)
throws XMLEncryptionException
EncryptedDataCipherData in this EncryptedData.
decrypt in interface EncryptedDatadecrypt in interface EncryptedTypedecryptContext - the decryption context
CipherData as an InputStream.
XMLEncryptionException - if an error occurs while decrypting
public void encrypt(XMLEncryptContext encryptContext)
throws MarshalException,
XMLEncryptionException
EncryptedTypeCipherValue or CipherReference of the CipherData of this
EncryptedData.
The data is assumed to be serialized by the application before invoking this method.
encrypt in interface EncryptedTypeencryptContext - the encryption context
MarshalException - if an error occurs while marshalling
XMLEncryptionException - if an error occurs while encryptingpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
static void serializeNode(org.w3c.dom.Node topNode,
org.w3c.dom.Node node,
org.w3c.dom.Node exceptedNode,
boolean withComments,
boolean xmlAttributes,
java.io.Writer wr)
throws java.io.IOException
java.io.IOExceptionpublic static java.util.Hashtable collectXMLPrefixAttributesInAncestors(org.w3c.dom.Node startNode)
public static java.util.Hashtable collectNamespaceNodesInAncestors(org.w3c.dom.Node startNode,
boolean useProxy)
|
XML Security, 1.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||