|
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 EncryptionMethod
ki
- 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 EncryptionMethod
ki
- the KeyInfo
, or null
if not specifiedeps
- the EncryptionProperties
or null
if not specified.cipherReference
- a cipherReferencepublic DOMEncryptedData(org.w3c.dom.Element encDataElem, XMLCryptoContext context) throws MarshalException
DOMEncryptedData
from XML.
encDataElem
- EncryptedData element
MarshalException
- if EncryptedData cannot be unmarshalledpublic 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()
EncryptedType
ID
.
getId
in interface EncryptedType
ID
, or null
if not specifiedpublic java.lang.String getType()
EncryptedType
getType
in interface EncryptedType
null
if not specifiedpublic java.lang.String getMimeType()
EncryptedType
getMimeType
in interface EncryptedType
null
if not specifiedpublic java.lang.String getEncoding()
EncryptedType
getEncoding
in interface EncryptedType
null
if not specifiedpublic EncryptionMethod getEncryptionMethod()
EncryptedType
getEncryptionMethod
in interface EncryptedType
null
if not specifiedpublic KeyInfo getKeyInfo()
EncryptedType
getKeyInfo
in interface EncryptedType
null
if not specifiedpublic CipherData getCipherData()
EncryptedType
getCipherData
in interface EncryptedType
null
if the data is a CipherValue
and the data has not been encrypted yetpublic EncryptionProperties getEncryptionProperties()
EncryptedType
getEncryptionProperties
in interface EncryptedType
null
if not specifiedpublic java.io.InputStream getCipherText()
getCipherText
in interface EncryptedType
java.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 DOMStructure
MarshalException
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
EncryptedData
CipherData
in this EncryptedData
and replace
the EncryptedData with the decrypted data or element
decryptAndReplace
in interface EncryptedData
decryptContext
- the decryption context
XMLEncryptionException
- if an error occurs while decryptingpublic java.io.InputStream decrypt(XMLDecryptContext decryptContext) throws XMLEncryptionException
EncryptedData
CipherData
in this EncryptedData
.
decrypt
in interface EncryptedData
decrypt
in interface EncryptedType
decryptContext
- the decryption context
CipherData
as an InputStream.
XMLEncryptionException
- if an error occurs while decryptingpublic void encrypt(XMLEncryptContext encryptContext) throws MarshalException, XMLEncryptionException
EncryptedType
CipherValue
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 EncryptedType
encryptContext
- 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.IOException
public 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 |