FileDocCategorySizeDatePackage
EncryptedKey.javaAPI DocJava SE 6 API4082Tue Jun 10 00:23:00 BST 2008com.sun.org.apache.xml.internal.security.encryption

EncryptedKey

public interface EncryptedKey implements EncryptedType
The EncryptedKey element 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 an EncryptedData element as a child of a ds:KeyInfo element. The key value is always encrypted to the recipient(s). When EncryptedKey is decrypted the resulting octets are made available to the EncryptionMethod algorithm without any additional processing.

Its schema definition is as follows:

<element name='EncryptedKey' type='xenc:EncryptedKeyType'/> <complexType name='EncryptedKeyType'> <complexContent> <extension base='xenc:EncryptedType'> <sequence> <element ref='xenc:ReferenceList' minOccurs='0'/> <element name='CarriedKeyName' type='string' minOccurs='0'/> </sequence> <attribute name='Recipient' type='string' use='optional'/> </extension> </complexContent> </complexType>
author
Axl Mattheus

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetCarriedName()
Returns a user readable name with the key value. This may then be used to reference the key using the ds:KeyName element within ds:KeyInfo. The same CarriedKeyName label, unlike an ID type, may occur multiple times within a single document. The value of the key is to be the same in all EncryptedKey elements identified with the same CarriedKeyName label within a single XML document.
Note that because whitespace is significant in the value of the ds:KeyName element, whitespace is also significant in the value of the CarriedKeyName element.

return
over all the carried names contained in this EncryptedKey.

public java.lang.StringgetRecipient()
Returns a hint as to which recipient this encrypted key value is intended for.

return
the recipient of the EncryptedKey.

public ReferenceListgetReferenceList()
Returns pointers to data and keys encrypted using this key. The reference list may contain multiple references to EncryptedKey and EncryptedData elements. This is done using KeyReference and DataReference elements respectively.

return
an Iterator over all the ReferenceLists contained in this EncryptedKey.

public voidsetCarriedName(java.lang.String name)
Sets the carried name.

param
name the carried name.

public voidsetRecipient(java.lang.String recipient)
Sets the recipient for this EncryptedKey.

param
recipient the recipient for this EncryptedKey.

public voidsetReferenceList(ReferenceList list)
Sets the ReferenceList to the EncryptedKey.

param
list a list of pointers to data elements encrypted using this key.