Package org.opensaml.xmlsec.encryption.support

# Class SimpleRetrievalMethodEncryptedKeyResolver

java.lang.Object
org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver
org.opensaml.xmlsec.encryption.support.SimpleRetrievalMethodEncryptedKeyResolver

All Implemented Interfaces:
  `EncryptedKeyResolver`

public class SimpleRetrievalMethodEncryptedKeyResolver extends AbstractEncryptedKeyResolver
Implementation of `EncryptedKeyResolver` which finds `EncryptedKey` elements by dereferencing `RetrievalMethod` children of the `KeyInfo` of the `EncryptedData` context. The RetrievalMethod must have a `Type` attribute with the value of `EncryptionConstants.TYPE_ENCRYPTED_KEY`. The `URI` attribute value must be a same-document fragment identifier (via ID attribute). Processing of transforms children of RetrievalMethod is not supported by this implementation.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`SimpleRetrievalMethodEncryptedKeyResolver()`
Constructor.
`SimpleRetrievalMethodEncryptedKeyResolver(String recipient)`
Deprecated.
`SimpleRetrievalMethodEncryptedKeyResolver(Set<String> recipients)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`protected EncryptedKey`
`dereferenceURI(RetrievalMethod rm)`
Dereference the URI attribute of the specified retrieval method into an EncryptedKey.
`Iterable<EncryptedKey>`
`resolve(EncryptedData encryptedData, Set<String> recipients)`
Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.

### Methods inherited from class org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver

`getEffectiveRecipients, getRecipients, matchCarriedKeyName, matchDataReference, matchRecipient`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver

`resolve`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

## Constructor Details

### SimpleRetrievalMethodEncryptedKeyResolver

public SimpleRetrievalMethodEncryptedKeyResolver()
Constructor.

### SimpleRetrievalMethodEncryptedKeyResolver

@Deprecated public SimpleRetrievalMethodEncryptedKeyResolver(@Nullable Set<String> recipients)
Deprecated.
Constructor.

Parameters:
  `recipients` - the set of recipients

### SimpleRetrievalMethodEncryptedKeyResolver

@Deprecated public SimpleRetrievalMethodEncryptedKeyResolver(@Nullable String recipient)
Deprecated.
Constructor.

Parameters:
  `recipient` - the recipient

## Method Details

### resolve

@Nonnull public Iterable<EncryptedKey> resolve(@Nonnull EncryptedData encryptedData, @Nullable Set<String> recipients)
Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.

Parameters:
  `encryptedData` - the EncryptedData element context in which to resolve
  `recipients` - the recipients to use during resolution
Returns:
  an iterable of EncryptedKey elements

### dereferenceURI

@Nullable protected EncryptedKey dereferenceURI(@Nonnull RetrievalMethod rm)
Dereference the URI attribute of the specified retrieval method into an EncryptedKey.

Parameters:
  `rm` - the RetrievalMethod to process
Returns:
  the dereferenced EncryptedKey