Module org.apache.santuario.xmlsec
Interface EncryptedKey
-
- All Superinterfaces:
EncryptedType
public interface EncryptedKey extends EncryptedType
TheEncryptedKeyelement is used to transport encryption keys from the originator to a known recipient(s). It may be used as a stand-alone XML document, be placed within an application document, or appear inside anEncryptedDataelement as a child of ads:KeyInfoelement. The key value is always encrypted to the recipient(s). WhenEncryptedKeyis decrypted the resulting octets are made available to theEncryptionMethodalgorithm without any additional processing.Its schema definition is as follows:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetCarriedName()Returns a user readable name with the key value.StringgetRecipient()Returns a hint as to which recipient this encrypted key value is intended for.ReferenceListgetReferenceList()Returns pointers to data and keys encrypted using this key.voidsetCarriedName(String name)Sets the carried name.voidsetRecipient(String recipient)Sets the recipient for thisEncryptedKey.voidsetReferenceList(ReferenceList list)Sets theReferenceListto theEncryptedKey.-
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
-
-
-
-
Method Detail
-
getRecipient
String getRecipient()
Returns a hint as to which recipient this encrypted key value is intended for.- Returns:
- the recipient of the
EncryptedKey.
-
setRecipient
void setRecipient(String recipient)
Sets the recipient for thisEncryptedKey.- Parameters:
recipient- the recipient for thisEncryptedKey.
-
getReferenceList
ReferenceList getReferenceList()
Returns pointers to data and keys encrypted using this key. The reference list may contain multiple references toEncryptedKeyandEncryptedDataelements. This is done usingKeyReferenceandDataReferenceelements respectively.- Returns:
- an
Iteratorover all theReferenceLists contained in thisEncryptedKey.
-
setReferenceList
void setReferenceList(ReferenceList list)
Sets theReferenceListto theEncryptedKey.- Parameters:
list- a list of pointers to data elements encrypted using this key.
-
getCarriedName
String getCarriedName()
Returns a user readable name with the key value. This may then be used to reference the key using theds:KeyNameelement withinds:KeyInfo. The sameCarriedKeyNamelabel, unlike an ID type, may occur multiple times within a single document. The value of the key is to be the same in allEncryptedKeyelements identified with the sameCarriedKeyNamelabel within a single XML document.
Note that because whitespace is significant in the value of theds:KeyNameelement, whitespace is also significant in the value of theCarriedKeyNameelement.- Returns:
- over all the carried names contained in
this
EncryptedKey.
-
setCarriedName
void setCarriedName(String name)
Sets the carried name.- Parameters:
name- the carried name.
-
-