|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.xml.security.utils.ElementProxy
|
+--org.apache.xml.security.utils.EncryptionElementProxy
|
+--org.apache.xml.security.encryption.EncryptedData
This class maps to the xenc:EncryptedData element.
| Field Summary |
| Fields inherited from class org.apache.xml.security.utils.ElementProxy |
_baseURI, _constructionElement, _doc, _state, MODE_CREATE, MODE_DECRYPT, MODE_ENCRYPT, MODE_PROCESS, MODE_SIGN, MODE_UNKNOWN, MODE_VERIFY |
| Constructor Summary | |
EncryptedData(org.w3c.dom.Document doc,
EncryptionMethod encryptionMethod,
KeyInfo keyInfo,
CipherData cipherData,
EncryptionProperties encryptionProperties,
java.lang.String Id,
java.lang.String Type)
Constructor EncryptedData |
|
EncryptedData(org.w3c.dom.Document doc,
java.lang.String encryptionMethod,
EncryptionMethodParams encryptionMethodParams,
KeyInfo keyInfo,
CipherData cipherData,
EncryptionProperties encryptionProperties,
java.lang.String Id,
java.lang.String Type)
Constructor EncryptedData |
|
EncryptedData(org.w3c.dom.Document doc,
java.lang.String encryptionMethod,
EncryptionMethodParams encryptionMethodParams,
KeyInfo keyInfo,
EncryptionProperties encryptionProperties,
java.lang.String Id)
Constructor EncryptedData |
|
EncryptedData(org.w3c.dom.Element element,
java.lang.String BaseURI)
Constructor EncryptedData |
|
| Method Summary | |
java.security.Key |
createSecretKeyFromBytes(byte[] encodedKey)
Method createSecretKeyFromBytes |
void |
decryptAndReplace(java.security.Key contentDecryptionKey)
Method decryptAndReplace |
void |
encryptContentAndReplace(org.w3c.dom.Node firstPlaintextNode,
int length,
java.security.Key contentEncryptionKey)
Encrypts some child Nodes of a given Element. |
void |
encryptContentAndReplace(org.w3c.dom.Node parentOfPlaintext,
java.security.Key contentEncryptionKey)
Encrypts all child Nodes of a given Element. |
void |
encryptElementAndReplace(org.w3c.dom.Element plaintextElement,
java.security.Key secretKey)
Method encryptAndReplace |
java.lang.String |
getBaseLocalName()
Returns the localname of the Elements of the sub-class. |
CipherData |
getCipherData()
Method getCipherData |
EncryptionMethod |
getEncryptionMethod()
Method getEncryptionMethod |
EncryptionProperties |
getEncryptionProperties()
Method getEncryptionProperties |
java.lang.String |
getId()
Returns the Id attribute |
KeyInfo |
getKeyInfo()
Method getKeyInfo |
java.lang.String |
getMediaTypeOfType()
Method getMediaTypeOfType |
java.lang.String |
getType()
Method getType |
boolean |
getTypeIsContent()
Method getTypeIsContent |
boolean |
getTypeIsElement()
Method getTypeIsElement |
boolean |
getTypeIsMediaType()
Method getTypeIsMediaType |
static void |
main(java.lang.String[] unused)
Method main |
static int |
min(int a,
int b)
Method min |
static int |
min(int a,
int b,
int c)
Method min |
static org.w3c.dom.Element |
replace(org.w3c.dom.Element oldElement,
byte[] plaintextBytes)
Method replace |
static org.w3c.dom.Element |
replace(org.w3c.dom.Element oldElement,
org.w3c.dom.Element newElement)
Replaces an old Element by a new one |
static org.w3c.dom.Element |
replace(org.w3c.dom.Element oldElement,
org.w3c.dom.NodeList newContent)
Method replace |
void |
setId(java.lang.String Id)
Sets the Id attribute |
void |
setType(java.lang.String Type)
Method setType |
| Methods inherited from class org.apache.xml.security.utils.EncryptionElementProxy |
getBaseNamespace |
| Methods inherited from class org.apache.xml.security.utils.ElementProxy |
addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getChildElementLocalName, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, guaranteeThatElementInCorrectSpace, length, setDefaultPrefix, setElement, setXPathNamespaceContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EncryptedData(org.w3c.dom.Document doc,
EncryptionMethod encryptionMethod,
KeyInfo keyInfo,
CipherData cipherData,
EncryptionProperties encryptionProperties,
java.lang.String Id,
java.lang.String Type)
throws XMLSecurityException
doc - encryptionMethod - keyInfo - cipherData - encryptionProperties - Id - Type -
XMLSecurityException
public EncryptedData(org.w3c.dom.Document doc,
java.lang.String encryptionMethod,
EncryptionMethodParams encryptionMethodParams,
KeyInfo keyInfo,
EncryptionProperties encryptionProperties,
java.lang.String Id)
throws XMLSecurityException
doc - encryptionMethod - encryptionMethodParams - keyInfo - encryptionProperties - Id -
XMLSecurityException
public EncryptedData(org.w3c.dom.Document doc,
java.lang.String encryptionMethod,
EncryptionMethodParams encryptionMethodParams,
KeyInfo keyInfo,
CipherData cipherData,
EncryptionProperties encryptionProperties,
java.lang.String Id,
java.lang.String Type)
throws XMLSecurityException
doc - encryptionMethod - encryptionMethodParams - keyInfo - cipherData - encryptionProperties - Id - Type -
XMLSecurityException
public EncryptedData(org.w3c.dom.Element element,
java.lang.String BaseURI)
throws XMLSecurityException
element - BaseURI -
XMLSecurityException| Method Detail |
public EncryptionMethod getEncryptionMethod()
throws XMLSecurityException
getEncryptionMethod in interface EncryptedTypeXMLSecurityException
public KeyInfo getKeyInfo()
throws XMLSecurityException
getKeyInfo in interface EncryptedTypeXMLSecurityException
public CipherData getCipherData()
throws XMLSecurityException
getCipherData in interface EncryptedTypeXMLSecurityException
public EncryptionProperties getEncryptionProperties()
throws XMLSecurityException
getEncryptionProperties in interface EncryptedTypeXMLSecurityExceptionpublic void setId(java.lang.String Id)
Id attribute
Id - IDpublic java.lang.String getId()
Id attribute
getId in interface EncryptedTypeId attributepublic void setType(java.lang.String Type)
Type - public java.lang.String getType()
getType in interface EncryptedTypepublic boolean getTypeIsElement()
getTypeIsElement in interface EncryptedTypepublic boolean getTypeIsContent()
getTypeIsContent in interface EncryptedTypepublic boolean getTypeIsMediaType()
getTypeIsMediaType in interface EncryptedTypepublic java.lang.String getMediaTypeOfType()
getMediaTypeOfType in interface EncryptedType
public static org.w3c.dom.Element replace(org.w3c.dom.Element oldElement,
org.w3c.dom.NodeList newContent)
oldElement - newContent -
public static org.w3c.dom.Element replace(org.w3c.dom.Element oldElement,
org.w3c.dom.Element newElement)
oldElement - the old Element which has to be removed from the DocumentnewElement - the new Element which has to be place in the position of oldElement
public static org.w3c.dom.Element replace(org.w3c.dom.Element oldElement,
byte[] plaintextBytes)
throws XMLSecurityException
oldElement - plaintextBytes -
XMLSecurityException
public java.security.Key createSecretKeyFromBytes(byte[] encodedKey)
throws XMLSecurityException
encodedKey -
XMLSecurityException
public void encryptElementAndReplace(org.w3c.dom.Element plaintextElement,
java.security.Key secretKey)
throws XMLSecurityException
plaintextElement - secretKey -
XMLSecurityException
public void encryptContentAndReplace(org.w3c.dom.Node parentOfPlaintext,
java.security.Key contentEncryptionKey)
throws XMLSecurityException
Nodes of a given Element.
parentOfPlaintext - the parent of the Nodes which are to be encrypted. All child nodes will be encrypted but not the parent itself.contentEncryptionKey - the Key which is used to encrypt the data
XMLSecurityException
public void encryptContentAndReplace(org.w3c.dom.Node firstPlaintextNode,
int length,
java.security.Key contentEncryptionKey)
throws XMLSecurityException
Nodes of a given Element.
firstPlaintextNode - the first Node to be encryptedlength - the total number of Nodes to be encrypted (the firstPlaintextNode and (length-1) next siblings)contentEncryptionKey - the Key which is used to encrypt the data
XMLSecurityException
public void decryptAndReplace(java.security.Key contentDecryptionKey)
throws XMLSecurityException
contentDecryptionKey -
XMLSecurityException
public static void main(java.lang.String[] unused)
throws java.lang.Exception
unused -
java.lang.Exception
public static int min(int a,
int b,
int c)
a - b - c -
public static int min(int a,
int b)
a - b - public java.lang.String getBaseLocalName()
ElementProxy
getBaseLocalName in class ElementProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||