org.systinet.wasp.security.ws.conf
Interface EncryptedKeyConf

All Superinterfaces:
ElementConf, EncryptedTypeConf, OrderedElementConf

public interface EncryptedKeyConf
extends EncryptedTypeConf

Represents configuration of EncryptedKey element defined by XML Encryption specification. It is based on EncryptedTypeConf.

Sender side
It represents a key used in next processing (encryption/signature).

Receiver
Receiver can check received message configuration's encrypted key using IncomingValidator.

Since:
4.6
Component:
Security-Providers

Method Summary
 byte[] getEncodedStoredKey()
          Gets key that is stored in this EncryptedKey.
 EncryptionReferenceConf[] getReferences()
          Returns an array of EncryptionReferenceConf that represents ReferenceList element.
 EncryptionReferenceConf newReference()
          Creates new instance of EncryptionReferenceConf.
 void setEncodedStoredKey(byte[] key)
          Sets key that is stored in this EncryptedKey.
 void setReferences(EncryptionReferenceConf[] referenceList)
          Sets ReferenceList element with an array of EncryptionReferenceConf.
 
Methods inherited from interface org.systinet.wasp.security.ws.conf.EncryptedTypeConf
getEncryptionMethodAlgorithm, getEncryptionMethodProperties, getIV, getKeyInfo, newEncryptionMethodProperty, newKeyInfo, setEncryptionMethodAlgorithm, setEncryptionMethodProperties, setIV, setKeyInfo
 
Methods inherited from interface org.systinet.wasp.security.ws.conf.OrderedElementConf
getOrder, setOrder
 
Methods inherited from interface org.systinet.wasp.security.ws.conf.ElementConf
getWsuId, setWsuId
 

Method Detail

setReferences

public void setReferences(EncryptionReferenceConf[] referenceList)
Sets ReferenceList element with an array of EncryptionReferenceConf. XML Encryption's ReferenceList is an element that contains references to another EncryptedData or EncryptedKeys that use Key transported by this EncryptedKey.

Parameters:
referenceList - array of EncryptionReferenceConf
See Also:
newReference(), getReferences()

getReferences

public EncryptionReferenceConf[] getReferences()
Returns an array of EncryptionReferenceConf that represents ReferenceList element.

Returns:
referenced elements
See Also:
setReferences(EncryptionReferenceConf[])

newReference

public EncryptionReferenceConf newReference()
Creates new instance of EncryptionReferenceConf.

Returns:
instance that is supposed to be filled by valid data
See Also:
setReferences(EncryptionReferenceConf[])

setEncodedStoredKey

public void setEncodedStoredKey(byte[] key)
Sets key that is stored in this EncryptedKey. If key is not set then it is generated using SecureRandom in runtime.
It is not recommeded to set the key in persistent descriptor, because key is usually symmetric key that shall be changed for each message.

Parameters:
key - encoded key as returned by Key.getEncoded().
See Also:
getEncodedStoredKey()

getEncodedStoredKey

public byte[] getEncodedStoredKey()
Gets key that is stored in this EncryptedKey.

Returns:
byte array represeting key
See Also:
setEncodedStoredKey(byte[])