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
Basic implementation of
KeyAgreementCredential
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Algorithm URI.private Credential
Originator credential.private KeyAgreementParameters
Parameters.private Credential
Recipient credential. -
Constructor Summary
ConstructorsConstructorDescriptionBasicKeyAgreementCredential
(SecretKey derivedKey, String agreementAlgorithm, Credential originator, Credential recipient) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe key agreement algorithm URI used.Class<? extends Credential>
Get the primary type of the credential instance.The credential holding the originator key material.The parameters to the key agreement operation.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 Details
-
algorithm
Algorithm URI. -
originatorCredential
Originator credential. -
recipientCredential
Recipient credential. -
parameters
Parameters.
-
-
Constructor Details
-
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 Details
-
getCredentialType
Get the primary type of the credential instance. This will usually be the primary sub-interface ofCredential
implemented by an implementation.- Specified by:
getCredentialType
in interfaceCredential
- Overrides:
getCredentialType
in classBasicCredential
- Returns:
- the credential type
-
getAlgorithm
The key agreement algorithm URI used.- Specified by:
getAlgorithm
in interfaceKeyAgreementCredential
- Returns:
- the algorithm
-
getOriginatorCredential
The credential holding the originator key material.- Specified by:
getOriginatorCredential
in interfaceKeyAgreementCredential
- Returns:
- the originator credential
-
getRecipientCredential
The credential holding the recipient key material.- Specified by:
getRecipientCredential
in interfaceKeyAgreementCredential
- Returns:
- the recipient credential
-
getParameters
The parameters to the key agreement operation.- Specified by:
getParameters
in interfaceKeyAgreementCredential
- Returns:
- the parameters
-