Package org.opensaml.xmlsec.agreement.impl

# Class AbstractDerivationKeyAgreementProcessor

java.lang.Object
org.opensaml.xmlsec.agreement.impl.AbstractKeyAgreementProcessor
org.opensaml.xmlsec.agreement.impl.AbstractDerivationKeyAgreementProcessor

All Implemented Interfaces:
  `KeyAgreementProcessor`

Direct Known Subclasses:
  `DHWithExplicitKDFKeyAgreementProcessor`, `ECDHKeyAgreementProcessor`

public abstract class AbstractDerivationKeyAgreementProcessor extends AbstractKeyAgreementProcessor
Abstract base class for `KeyAgreementProcessor` implementations which do key derivation by means of a required `KeyDerivation` parameter.

## Constructor Summary

Constructors
Constructor
Description
`AbstractDerivationKeyAgreementProcessor()`

## Method Summary

Modifier and Type
Method
Description
`protected SecretKey`
`deriveSecretKey(byte[] secret, String keyAlgorithm, KeyAgreementParameters parameters)`
Derive a `SecretKey` from a given secret.

### Methods inherited from class org.opensaml.xmlsec.agreement.impl.AbstractKeyAgreementProcessor

`buildKeyAgreementCredential, execute, generateAgreementSecret, obtainPrivateCredential`

### 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.agreement.KeyAgreementProcessor

`getAlgorithm`

## Constructor Details

### AbstractDerivationKeyAgreementProcessor

public AbstractDerivationKeyAgreementProcessor()

## Method Details

### deriveSecretKey

@Nonnull protected SecretKey deriveSecretKey(@Nonnull byte[] secret, @Nonnull String keyAlgorithm, @Nonnull KeyAgreementParameters parameters) throws KeyAgreementException
Derive a `SecretKey` from a given secret.

Specified by:
  `deriveSecretKey` in class `AbstractKeyAgreementProcessor`
Parameters:
  `secret` - the input secret
  `keyAlgorithm` - the JCA key algorithm for the derived key
  `parameters` - the key agreement parameters
Returns:
  the derived secret key
Throws:
  `KeyAgreementException` - if key derivation operation does not complete successfully