Class XMLCipher.Factory.EncryptedKeyImpl
java.lang.Object
org.apache.xml.security.encryption.XMLCipher.Factory.EncryptedTypeImpl
org.apache.xml.security.encryption.XMLCipher.Factory.EncryptedKeyImpl
- All Implemented Interfaces:
EncryptedKey
,EncryptedType
- Enclosing class:
- XMLCipher.Factory
private class XMLCipher.Factory.EncryptedKeyImpl
extends XMLCipher.Factory.EncryptedTypeImpl
implements EncryptedKey
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a user readable name with the key value.Returns a hint as to which recipient this encrypted key value is intended for.Returns pointers to data and keys encrypted using this key.void
setCarriedName
(String name) Sets the carried name.void
setRecipient
(String recipient) Sets the recipient for thisEncryptedKey
.void
Sets theReferenceList
to theEncryptedKey
.(package private) Element
Methods inherited from class org.apache.xml.security.encryption.XMLCipher.Factory.EncryptedTypeImpl
getCipherData, getEncoding, getEncryptionMethod, getEncryptionProperties, getId, getKeyInfo, getMimeType, getType, setEncoding, setEncryptionMethod, setEncryptionProperties, setId, setKeyInfo, setMimeType, setType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.xml.security.encryption.EncryptedType
getCipherData, getEncoding, getEncryptionMethod, getEncryptionProperties, getId, getKeyInfo, getMimeType, getType, setEncoding, setEncryptionMethod, setEncryptionProperties, setId, setKeyInfo, setMimeType, setType
-
Field Details
-
keyRecipient
-
referenceList
-
carriedName
-
-
Constructor Details
-
EncryptedKeyImpl
- Parameters:
data
-
-
-
Method Details
-
getRecipient
Returns a hint as to which recipient this encrypted key value is intended for.- Specified by:
getRecipient
in interfaceEncryptedKey
- Returns:
- the recipient of the
EncryptedKey
.
-
setRecipient
Sets the recipient for thisEncryptedKey
.- Specified by:
setRecipient
in interfaceEncryptedKey
- Parameters:
recipient
- the recipient for thisEncryptedKey
.
-
getReferenceList
Returns pointers to data and keys encrypted using this key. The reference list may contain multiple references toEncryptedKey
andEncryptedData
elements. This is done usingKeyReference
andDataReference
elements respectively.- Specified by:
getReferenceList
in interfaceEncryptedKey
- Returns:
- an
Iterator
over all theReferenceList
s contained in thisEncryptedKey
.
-
setReferenceList
Sets theReferenceList
to theEncryptedKey
.- Specified by:
setReferenceList
in interfaceEncryptedKey
- Parameters:
list
- a list of pointers to data elements encrypted using this key.
-
getCarriedName
Returns a user readable name with the key value. This may then be used to reference the key using theds:KeyName
element withinds:KeyInfo
. The sameCarriedKeyName
label, unlike an ID type, may occur multiple times within a single document. The value of the key is to be the same in allEncryptedKey
elements identified with the sameCarriedKeyName
label within a single XML document.
Note that because whitespace is significant in the value of theds:KeyName
element, whitespace is also significant in the value of theCarriedKeyName
element.- Specified by:
getCarriedName
in interfaceEncryptedKey
- Returns:
- over all the carried names contained in
this
EncryptedKey
.
-
setCarriedName
Sets the carried name.- Specified by:
setCarriedName
in interfaceEncryptedKey
- Parameters:
name
- the carried name.
-
toElement
Element toElement()
-