|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.xml.encryption.Encrypter
org.opensaml.saml2.encryption.Encrypter
public class Encrypter
Encrypter for SAML 2 SAMLObjects which has specific options for generating instances of subtypes of
EncryptedElementType
.
Nested Class Summary | |
---|---|
static class |
Encrypter.KeyPlacement
Options for where to place the resulting EncryptedKey elements with respect to the associated EncryptedData element. |
Constructor Summary | |
---|---|
Encrypter(EncryptionParameters dataEncParams)
Constructor. |
|
Encrypter(EncryptionParameters dataEncParams,
KeyEncryptionParameters keyEncParam)
Constructor. |
|
Encrypter(EncryptionParameters dataEncParams,
java.util.List<KeyEncryptionParameters> keyEncParams)
Constructor. |
Method Summary | |
---|---|
EncryptedAssertion |
encrypt(Assertion assertion)
Encrypt the specified Assertion. |
EncryptedAttribute |
encrypt(Attribute attribute)
Encrypt the specified Attribute. |
EncryptedID |
encrypt(BaseID baseID)
Encrypt the specified BaseID. |
EncryptedID |
encrypt(NameID nameID)
Encrypt the specified NameID. |
NewEncryptedID |
encrypt(NewID newID)
Encrypt the specified NewID. |
EncryptedID |
encryptAsID(Assertion assertion)
Encrypt the specified Assertion, treating as an identifier and returning an EncryptedID. |
Encrypter.KeyPlacement |
getKeyPlacement()
Get the current key placement option. |
protected void |
linkMultiplePeerKeys(EncryptedData encData,
java.util.List<EncryptedKey> encKeys)
Link multiple "multicast" EncryptedKeys to the EncryptedData according to guidelines in SAML Errata E43. |
protected void |
linkSinglePeerKey(EncryptedData encData,
EncryptedKey encKey)
Link a single EncryptedKey to the EncryptedData according to guidelines in SAML Errata E43. |
protected EncryptedElementType |
placeKeysAsPeers(EncryptedElementType encElement,
EncryptedData encData,
java.util.List<EncryptedKey> encKeys)
Store the specified EncryptedData and EncryptedKey(s) in the specified instance of EncryptedElementType as peer elements, following SAML 2 Errata E43 guidelines for forward and back referencing between the EncryptedData and EncryptedKey(s). |
protected EncryptedElementType |
placeKeysInline(EncryptedElementType encElement,
EncryptedData encData,
java.util.List<EncryptedKey> encKeys)
Place the EncryptedKey elements inside the KeyInfo element within the EncryptedData element. |
protected EncryptedElementType |
processElements(EncryptedElementType encElement,
EncryptedData encData,
java.util.List<EncryptedKey> encKeys)
Handle post-processing of generated EncryptedData and EncryptedKey(s) and storage in the appropriate EncryptedElementType instance. |
void |
setIDGenerator(IdentifierGenerator newIDGenerator)
Set the generator to use when creating XML ID attribute values. |
void |
setKeyPlacement(Encrypter.KeyPlacement newKeyPlacement)
Set the key placement option. |
Methods inherited from class org.opensaml.xml.encryption.Encrypter |
---|
checkAndMarshall, checkParams, checkParams, checkParams, checkParams, encryptElement, encryptElement, encryptElement, encryptElement, encryptElementContent, encryptElementContent, encryptElementContent, encryptKey, encryptKey, encryptKey, generateEncryptionKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Encrypter(EncryptionParameters dataEncParams, java.util.List<KeyEncryptionParameters> keyEncParams)
dataEncParams
- the data encryption parameterskeyEncParams
- the key encryption parameterspublic Encrypter(EncryptionParameters dataEncParams, KeyEncryptionParameters keyEncParam)
dataEncParams
- the data encryption parameterskeyEncParam
- the key encryption parameterpublic Encrypter(EncryptionParameters dataEncParams)
dataEncParams
- the data encryption parametersMethod Detail |
---|
public void setIDGenerator(IdentifierGenerator newIDGenerator)
newIDGenerator
- the new IdentifierGenerator to usepublic Encrypter.KeyPlacement getKeyPlacement()
public void setKeyPlacement(Encrypter.KeyPlacement newKeyPlacement)
newKeyPlacement
- The new key placement option to setpublic EncryptedAssertion encrypt(Assertion assertion) throws EncryptionException
assertion
- the Assertion to encrypt
EncryptionException
- thrown when encryption generates an errorpublic EncryptedID encryptAsID(Assertion assertion) throws EncryptionException
assertion
- the Assertion to encrypt
EncryptionException
- thrown when encryption generates an errorpublic EncryptedAttribute encrypt(Attribute attribute) throws EncryptionException
attribute
- the Attribute to encrypt
EncryptionException
- thrown when encryption generates an errorpublic EncryptedID encrypt(NameID nameID) throws EncryptionException
nameID
- the NameID to encrypt
EncryptionException
- thrown when encryption generates an errorpublic EncryptedID encrypt(BaseID baseID) throws EncryptionException
baseID
- the BaseID to encrypt
EncryptionException
- thrown when encryption generates an errorpublic NewEncryptedID encrypt(NewID newID) throws EncryptionException
newID
- the NewID to encrypt
EncryptionException
- thrown when encryption generates an errorprotected EncryptedElementType processElements(EncryptedElementType encElement, EncryptedData encData, java.util.List<EncryptedKey> encKeys) throws EncryptionException
encElement
- the EncryptedElementType instance which will hold the encrypted data and keysencData
- the EncryptedData objectencKeys
- the list of EncryptedKey objects
EncryptionException
- thrown when processing encounters an errorprotected EncryptedElementType placeKeysInline(EncryptedElementType encElement, EncryptedData encData, java.util.List<EncryptedKey> encKeys)
encElement
- the EncryptedElementType instance which will hold the encrypted data and keysencData
- the EncryptedData objectencKeys
- the list of EncryptedKey objects
protected EncryptedElementType placeKeysAsPeers(EncryptedElementType encElement, EncryptedData encData, java.util.List<EncryptedKey> encKeys)
encElement
- a specialization of EncryptedElementType to store the encrypted data and keysencData
- the EncryptedData to storeencKeys
- the EncryptedKey(s) to store
protected void linkSinglePeerKey(EncryptedData encData, EncryptedKey encKey)
encData
- the EncryptedDataencKey
- the EncryptedKeyprotected void linkMultiplePeerKeys(EncryptedData encData, java.util.List<EncryptedKey> encKeys)
encData
- the EncryptedDataencKeys
- the list of EncryptedKeys
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |