org.apache.xml.security.encryption
Class EncryptedKey

java.lang.Object
  |
  +--org.apache.xml.security.utils.ElementProxy
        |
        +--org.apache.xml.security.utils.EncryptionElementProxy
              |
              +--org.apache.xml.security.encryption.EncryptedKey
All Implemented Interfaces:
EncryptedType

public class EncryptedKey
extends EncryptionElementProxy
implements EncryptedType

This class maps to the xenc:EncryptedKey element.

Author:
$Author: vdkoogh $

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
EncryptedKey(org.w3c.dom.Document doc, EncryptionMethod encryptionMethod, KeyInfo keyInfo, CipherData cipherData, EncryptionProperties encryptionProperties, ReferenceList referenceList, java.lang.String CarriedKeyName, java.lang.String Id, java.lang.String Type, java.lang.String Recipient)
          Constructor EncryptedKey
EncryptedKey(org.w3c.dom.Document doc, java.lang.String encryptionMethodURI, EncryptionMethodParams encryptionMethodParams, KeyInfo keyInfo, java.security.Key contentKey, java.security.Key wrapKey, EncryptionProperties encryptionProperties, ReferenceList referenceList, java.lang.String CarriedKeyName, java.lang.String Id, java.lang.String Type, java.lang.String Recipient)
          Constructor EncryptedKey
EncryptedKey(org.w3c.dom.Element element, java.lang.String BaseURI)
          Constructor EncryptedKey
 
Method Summary
 void addDataReference(DataReference dataReference)
          Method addDataReference
 void addKeyReference(KeyReference keyReference)
          Method addKeyReference
 java.lang.String getBaseLocalName()
          Method getBaseLocalName
 CarriedKeyName getCarriedKeyName()
          Method getCarriedKeyName
 CipherData getCipherData()
          Method getCipherData
 EncryptionMethod getEncryptionMethod()
          Method getEncryptionMethod
 EncryptionProperties getEncryptionProperties()
          Method getEncryptionProperties
 java.lang.String getId()
          Returns the Id attribute
 KeyInfo getKeyInfo()
          Method getKeyInfo
 int getLengthDataReference()
          Method getLengthDataReference
 int getLengthKeyReference()
          Method getLengthKeyReference
 java.lang.String getMediaTypeOfType()
          Method getMediaTypeOfType
 java.lang.String getRecipient()
          Method getRecipient
 ReferenceList getReferenceList()
          Method getReferenceList
 java.lang.String getType()
          Method getType
 boolean getTypeIsContent()
          Method getTypeIsContent
 boolean getTypeIsElement()
          Method getTypeIsElement
 boolean getTypeIsMediaType()
          Method getTypeIsMediaType
 DataReference itemDataReference(int i)
          Method itemDataReference
 KeyReference itemKeyReference(int i)
          Method itemKeyReference
static void main(java.lang.String[] unused)
          Method main
 void setCarriedKeyName(java.lang.String carriedKeyName)
          Method setCarriedKeyName
 void setId(java.lang.String Id)
          Sets the Id attribute
 void setRecipient(java.lang.String recipient)
          Method setRecipient
 void setType(java.lang.String Type)
          Sets the Type attribute
 java.security.Key unwrap(java.security.Key wrapKey, java.lang.String wrappedKeyAlgoURI)
           
 
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

EncryptedKey

public EncryptedKey(org.w3c.dom.Document doc,
                    EncryptionMethod encryptionMethod,
                    KeyInfo keyInfo,
                    CipherData cipherData,
                    EncryptionProperties encryptionProperties,
                    ReferenceList referenceList,
                    java.lang.String CarriedKeyName,
                    java.lang.String Id,
                    java.lang.String Type,
                    java.lang.String Recipient)
             throws XMLSecurityException
Constructor EncryptedKey

Parameters:
doc -
encryptionMethod -
keyInfo -
cipherData -
encryptionProperties -
referenceList -
CarriedKeyName -
Id -
Type -
Recipient -
Throws:
XMLSecurityException

EncryptedKey

public EncryptedKey(org.w3c.dom.Document doc,
                    java.lang.String encryptionMethodURI,
                    EncryptionMethodParams encryptionMethodParams,
                    KeyInfo keyInfo,
                    java.security.Key contentKey,
                    java.security.Key wrapKey,
                    EncryptionProperties encryptionProperties,
                    ReferenceList referenceList,
                    java.lang.String CarriedKeyName,
                    java.lang.String Id,
                    java.lang.String Type,
                    java.lang.String Recipient)
             throws XMLSecurityException
Constructor EncryptedKey

Parameters:
doc -
encryptionMethodURI -
encryptionMethodParams -
keyInfo -
contentKey -
wrapKey -
encryptionProperties -
referenceList -
CarriedKeyName -
Id -
Type -
Recipient -
Throws:
XMLSecurityException

EncryptedKey

public EncryptedKey(org.w3c.dom.Element element,
                    java.lang.String BaseURI)
             throws XMLSecurityException
Constructor EncryptedKey

Parameters:
element -
BaseURI -
Throws:
XMLSecurityException
Method Detail

getReferenceList

public ReferenceList getReferenceList()
                               throws XMLSecurityException
Method getReferenceList

Throws:
XMLSecurityException

addDataReference

public void addDataReference(DataReference dataReference)
                      throws XMLSecurityException
Method addDataReference

Parameters:
dataReference -
Throws:
XMLSecurityException

addKeyReference

public void addKeyReference(KeyReference keyReference)
                     throws XMLSecurityException
Method addKeyReference

Parameters:
keyReference -
Throws:
XMLSecurityException

getLengthDataReference

public int getLengthDataReference()
                           throws XMLSecurityException
Method getLengthDataReference

Throws:
XMLSecurityException

getLengthKeyReference

public int getLengthKeyReference()
                          throws XMLSecurityException
Method getLengthKeyReference

Throws:
XMLSecurityException

itemDataReference

public DataReference itemDataReference(int i)
                                throws XMLSecurityException
Method itemDataReference

Parameters:
i -
Throws:
XMLSecurityException

itemKeyReference

public KeyReference itemKeyReference(int i)
                              throws XMLSecurityException
Method itemKeyReference

Parameters:
i -
Throws:
XMLSecurityException

setCarriedKeyName

public void setCarriedKeyName(java.lang.String carriedKeyName)
                       throws XMLSecurityException
Method setCarriedKeyName

Parameters:
carriedKeyName -
Throws:
XMLSecurityException

getCarriedKeyName

public CarriedKeyName getCarriedKeyName()
                                 throws XMLSecurityException
Method getCarriedKeyName

Throws:
XMLSecurityException

getRecipient

public java.lang.String getRecipient()
Method getRecipient


setRecipient

public void setRecipient(java.lang.String recipient)
Method setRecipient

Parameters:
recipient -

getEncryptionMethod

public EncryptionMethod getEncryptionMethod()
                                     throws XMLSecurityException
Method getEncryptionMethod

Specified by:
getEncryptionMethod in interface EncryptedType
Throws:
XMLSecurityException

getKeyInfo

public KeyInfo getKeyInfo()
                   throws XMLSecurityException
Method getKeyInfo

Specified by:
getKeyInfo in interface EncryptedType
Throws:
XMLSecurityException

getCipherData

public CipherData getCipherData()
                         throws XMLSecurityException
Method getCipherData

Specified by:
getCipherData in interface EncryptedType
Throws:
XMLSecurityException

getEncryptionProperties

public EncryptionProperties getEncryptionProperties()
                                             throws XMLSecurityException
Method getEncryptionProperties

Specified by:
getEncryptionProperties in interface EncryptedType
Throws:
XMLSecurityException

setId

public void setId(java.lang.String Id)
Sets the Id attribute

Parameters:
Id - ID

getId

public java.lang.String getId()
Returns the Id attribute

Specified by:
getId in interface EncryptedType
Returns:
the Id attribute

setType

public void setType(java.lang.String Type)
Sets the Type attribute

Parameters:
Type -

getType

public java.lang.String getType()
Method getType

Specified by:
getType in interface EncryptedType

getTypeIsElement

public boolean getTypeIsElement()
Method getTypeIsElement

Specified by:
getTypeIsElement in interface EncryptedType

getTypeIsContent

public boolean getTypeIsContent()
Method getTypeIsContent

Specified by:
getTypeIsContent in interface EncryptedType

getTypeIsMediaType

public boolean getTypeIsMediaType()
Method getTypeIsMediaType

Specified by:
getTypeIsMediaType in interface EncryptedType

getMediaTypeOfType

public java.lang.String getMediaTypeOfType()
Method getMediaTypeOfType

Specified by:
getMediaTypeOfType in interface EncryptedType

getBaseLocalName

public java.lang.String getBaseLocalName()
Method getBaseLocalName

Specified by:
getBaseLocalName in class ElementProxy
Returns:
the localname of the Elements of the sub-class.

unwrap

public java.security.Key unwrap(java.security.Key wrapKey,
                                java.lang.String wrappedKeyAlgoURI)
                         throws XMLSecurityException
XMLSecurityException

main

public static void main(java.lang.String[] unused)
                 throws java.lang.Exception
Method main

Parameters:
unused -
Throws:
java.lang.Exception