Class BasicKeyAgreementCredential
- java.lang.Object
-
- org.opensaml.security.credential.AbstractCredential
-
- org.opensaml.security.credential.BasicCredential
-
- org.opensaml.xmlsec.agreement.impl.BasicKeyAgreementCredential
-
- All Implemented Interfaces:
Credential,MutableCredential,KeyAgreementCredential
public class BasicKeyAgreementCredential extends BasicCredential implements KeyAgreementCredential
Basic implementation ofKeyAgreementCredential.
-
-
Field Summary
Fields Modifier and Type Field Description private StringalgorithmAlgorithm URI.private CredentialoriginatorCredentialOriginator credential.private KeyAgreementParametersparametersParameters.private CredentialrecipientCredentialRecipient credential.
-
Constructor Summary
Constructors Constructor Description BasicKeyAgreementCredential(SecretKey derivedKey, String agreementAlgorithm, Credential originator, Credential recipient)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlgorithm()The key agreement algorithm URI used.Class<? extends Credential>getCredentialType()Get the primary type of the credential instance.CredentialgetOriginatorCredential()The credential holding the originator key material.KeyAgreementParametersgetParameters()The parameters to the key agreement operation.CredentialgetRecipientCredential()The credential holding the recipient key material.-
Methods inherited from class org.opensaml.security.credential.BasicCredential
setEntityId, setPrivateKey, setPublicKey, setSecretKey, setUsageType
-
Methods inherited from class org.opensaml.security.credential.AbstractCredential
getCredentialContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensaml.security.credential.Credential
getCredentialContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageType
-
-
-
-
Field Detail
-
algorithm
@Nonnull private String algorithm
Algorithm URI.
-
originatorCredential
@Nonnull private Credential originatorCredential
Originator credential.
-
recipientCredential
@Nonnull private Credential recipientCredential
Recipient credential.
-
parameters
@Nonnull private KeyAgreementParameters parameters
Parameters.
-
-
Constructor Detail
-
BasicKeyAgreementCredential
public BasicKeyAgreementCredential(@Nonnull SecretKey derivedKey, @Nonnull String agreementAlgorithm, @Nonnull Credential originator, @Nonnull Credential recipient)Constructor.- Parameters:
derivedKey- the derived secret keyagreementAlgorithm- the key agreement algorithmoriginator- the originator credentialrecipient- the recipient credential
-
-
Method Detail
-
getCredentialType
@Nonnull public Class<? extends Credential> getCredentialType()
Get the primary type of the credential instance. This will usually be the primary sub-interface ofCredentialimplemented by an implementation.- Specified by:
getCredentialTypein interfaceCredential- Overrides:
getCredentialTypein classBasicCredential- Returns:
- the credential type
-
getAlgorithm
@Nonnull public String getAlgorithm()
The key agreement algorithm URI used.- Specified by:
getAlgorithmin interfaceKeyAgreementCredential- Returns:
- the algorithm
-
getOriginatorCredential
@Nonnull public Credential getOriginatorCredential()
The credential holding the originator key material.- Specified by:
getOriginatorCredentialin interfaceKeyAgreementCredential- Returns:
- the originator credential
-
getRecipientCredential
@Nonnull public Credential getRecipientCredential()
The credential holding the recipient key material.- Specified by:
getRecipientCredentialin interfaceKeyAgreementCredential- Returns:
- the recipient credential
-
getParameters
@Nonnull public KeyAgreementParameters getParameters()
The parameters to the key agreement operation.- Specified by:
getParametersin interfaceKeyAgreementCredential- Returns:
- the parameters
-
-