org.opensaml.saml2.encryption
Class Decrypter

java.lang.Object
  extended by org.opensaml.xml.encryption.Decrypter
      extended by org.opensaml.saml2.encryption.Decrypter

public class Decrypter
extends Decrypter

Class which implements SAML2-specific options for EncryptedElementType objects.

For information on other parameters and options, and general XML Encryption issues, see Decrypter.


Field Summary
private  org.slf4j.Logger log
          Class logger.
 
Constructor Summary
Decrypter(KeyInfoCredentialResolver newResolver, KeyInfoCredentialResolver newKEKResolver, EncryptedKeyResolver newEncKeyResolver)
          Constructor.
 
Method Summary
 Assertion decrypt(EncryptedAssertion encryptedAssertion)
          Decrypt the specified EncryptedAssertion.
 Attribute decrypt(EncryptedAttribute encryptedAttribute)
          Decrypt the specified EncryptedAttribute.
 SAMLObject decrypt(EncryptedID encryptedID)
          Decrypt the specified EncryptedID.
 NewID decrypt(NewEncryptedID newEncryptedID)
          Decrypt the specified NewEncryptedID.
private  SAMLObject decryptData(EncryptedElementType encElement)
          Decrypt the specified instance of EncryptedElementType, and return it as an instance of the specified QName.
 
Methods inherited from class org.opensaml.xml.encryption.Decrypter
checkAndMarshall, decryptData, decryptData, decryptDataToDOM, decryptDataToDOM, decryptDataToList, decryptDataToList, decryptKey, decryptKey, getEncryptedKeyResolver, getJCAProviderName, getKEKResolver, getKEKResolverCriteria, getKeyResolver, isRootInNewDocument, preProcessEncryptedKey, setEncryptedKeyResolver, setJCAProviderName, setKEKResolver, setKEKResolverCriteria, setKeyResolver, setKeyResolverCriteria, setKeyResolverCriteria, setRootInNewDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.slf4j.Logger log
Class logger.

Constructor Detail

Decrypter

public Decrypter(KeyInfoCredentialResolver newResolver,
                 KeyInfoCredentialResolver newKEKResolver,
                 EncryptedKeyResolver newEncKeyResolver)
Constructor.

Parameters:
newResolver - resolver for data encryption keys.
newKEKResolver - resolver for key encryption keys.
newEncKeyResolver - resolver for EncryptedKey elements
Method Detail

decrypt

public Assertion decrypt(EncryptedAssertion encryptedAssertion)
                  throws DecryptionException
Decrypt the specified EncryptedAssertion.

Parameters:
encryptedAssertion - the EncryptedAssertion to decrypt
Returns:
an Assertion
Throws:
DecryptionException - thrown when decryption generates an error

decrypt

public Attribute decrypt(EncryptedAttribute encryptedAttribute)
                  throws DecryptionException
Decrypt the specified EncryptedAttribute.

Parameters:
encryptedAttribute - the EncryptedAttribute to decrypt
Returns:
an Attribute
Throws:
DecryptionException - thrown when decryption generates an error

decrypt

public SAMLObject decrypt(EncryptedID encryptedID)
                   throws DecryptionException
Decrypt the specified EncryptedID.

Note that an EncryptedID can contain a NameID, an Assertion or a BaseID. It is up to the caller to determine the type of the resulting SAMLObject.

Parameters:
encryptedID - the EncryptedID to decrypt
Returns:
an XMLObject
Throws:
DecryptionException - thrown when decryption generates an error

decrypt

public NewID decrypt(NewEncryptedID newEncryptedID)
              throws DecryptionException
Decrypt the specified NewEncryptedID.

Parameters:
newEncryptedID - the NewEncryptedID to decrypt
Returns:
a NewID
Throws:
DecryptionException - thrown when decryption generates an error

decryptData

private SAMLObject decryptData(EncryptedElementType encElement)
                        throws DecryptionException
Decrypt the specified instance of EncryptedElementType, and return it as an instance of the specified QName.

Parameters:
encElement - the EncryptedElementType to decrypt
Returns:
the decrypted SAMLObject
Throws:
DecryptionException - thrown when decryption generates an error


Copyright © 1999-2012. All Rights Reserved.