Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.keys.keyresolver.implementations
Class EncryptedKeyResolver

    java.lang.Object
      org.apache.xml.security.keys.keyresolver.KeyResolverSpi
          org.apache.xml.security.keys.keyresolver.implementations.EncryptedKeyResolver

    public class EncryptedKeyResolver

extends KeyResolverSpi

The `EncryptedKeyResolver` is not a generic resolver. It can only be for specific instantiations, as the key being unwrapped will always be of a particular type and will always have been wrapped by another key which needs to be recursively resolved. The `EncryptedKeyResolver` can therefore only be instantiated with an algorithm. It can also be instantiated with a key (the KEK) or will search the static KeyResolvers to find the appropriate key.

Author:
  Berin Lautenbach

Field Summary

Fields inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
`globalResolver, properties, secureValidation`

Constructor Summary
`EncryptedKeyResolver(java.lang.String algorithm)` Constructor for use when a KEK needs to be derived from a KeyInfo list
`EncryptedKeyResolver(java.lang.String algorithm, java.security.Key kek)` Constructor used for when a KEK has been set

Method Summary
`java.security.PublicKey` | `engineLookupAndResolvePublicKey(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineLookupAndResolvePublicKey
`javax.crypto.SecretKey` | `engineLookupAndResolveSecretKey(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineLookupAndResolveSecretKey
`java.security.cert.X509Certificate` | `engineLookupResolveX509Certificate(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineLookupResolveX509Certificate
`void` | `registerInternalKeyResolver(KeyResolverSpi realKeyResolver)` This method is used to add a custom `KeyResolverSpi` to help resolve the KEK.

Methods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
`engineCanResolve, engineGetProperty, engineLookupAndResolvePrivateKey, engineResolvePublicKey, engineResolveSecretKey, engineResolveX509Certificate, engineSetProperty, setGlobalResolver, setSecureValidation, understandsProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EncryptedKeyResolver

    public EncryptedKeyResolver(java.lang.String algorithm)

  Constructor for use when a KEK needs to be derived from a KeyInfo list

  Parameters:
    `algorithm` -

### EncryptedKeyResolver

    public EncryptedKeyResolver(java.lang.String algorithm,
                                java.security.Key kek)

  Constructor used for when a KEK has been set

  Parameters:
    `algorithm` -
    `kek` -

Method Detail

### registerInternalKeyResolver

    public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver)

  This method is used to add a custom `KeyResolverSpi` to help resolve the KEK.

  Parameters:
    `realKeyResolver` -

### engineLookupAndResolvePublicKey

    public java.security.PublicKey engineLookupAndResolvePublicKey(org.w3c.dom.Element element,
                                                                   java.lang.String BaseURI,
                                                                   StorageResolver storage)

  Description copied from class: `KeyResolverSpi`
  Method engineLookupAndResolvePublicKey

  Overrides:
    `engineLookupAndResolvePublicKey` in class `KeyResolverSpi`
  Returns:
    resolved public key from the registered from the element.

### engineLookupResolveX509Certificate

    public java.security.cert.X509Certificate engineLookupResolveX509Certificate(org.w3c.dom.Element element,
                                                                                 java.lang.String BaseURI,
                                                                                 StorageResolver storage)

  Description copied from class: `KeyResolverSpi`
  Method engineLookupResolveX509Certificate

  Overrides:
    `engineLookupResolveX509Certificate` in class `KeyResolverSpi`
  Returns:
    resolved X509Certificate key from the registered from the elements

### engineLookupAndResolveSecretKey

    public javax.crypto.SecretKey engineLookupAndResolveSecretKey(org.w3c.dom.Element element,
                                                                  java.lang.String BaseURI,
                                                                  StorageResolver storage)

  Description copied from class: `KeyResolverSpi`
  Method engineLookupAndResolveSecretKey

  Overrides:
    `engineLookupAndResolveSecretKey` in class `KeyResolverSpi`
  Returns:
    resolved SecretKey key from the registered from the elements

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD