Package org.wildfly.security.credential
Class KeyPairCredential
- java.lang.Object
- 
- org.wildfly.security.credential.KeyPairCredential
 
- 
- All Implemented Interfaces:
- Cloneable,- AlgorithmCredential,- Credential
 
 public final class KeyPairCredential extends Object implements AlgorithmCredential A public/private key pair credential.
- 
- 
Field Summary- 
Fields inherited from interface org.wildfly.security.credential.CredentialNO_CREDENTIALS
 
- 
 - 
Constructor SummaryConstructors Constructor Description KeyPairCredential(KeyPair keyPair)Construct a new instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyPairCredentialclone()Creates and returns a copy of thisCredential.booleanequals(Object obj)StringgetAlgorithm()Get the algorithm name associated with this credential (will never benull).KeyPairgetKeyPair()Get the key pair.<P extends AlgorithmParameterSpec>
 PgetParameters(Class<P> paramSpecClass)Get the algorithm parameters of the given type from this credential.inthashCode()booleanimpliesSameParameters(AlgorithmCredential other)Determine whether the other credential's parameters are implied by this one.booleansupportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)Determine whether this credential instance supports the given algorithm parameter type.- 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.wildfly.security.credential.AlgorithmCredentialgetParameters, impliesParameters, matches, matches, matches, supportsParameters
 - 
Methods inherited from interface org.wildfly.security.credential.CredentialcanVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, verify, verify
 
- 
 
- 
- 
- 
Constructor Detail- 
KeyPairCredentialpublic KeyPairCredential(KeyPair keyPair) Construct a new instance.- Parameters:
- keyPair- the key pair (may not be- null)
 
 
- 
 - 
Method Detail- 
getKeyPairpublic KeyPair getKeyPair() Get the key pair.- Returns:
- the key pair (not null)
 
 - 
supportsParameterspublic boolean supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass) Description copied from interface:AlgorithmCredentialDetermine whether this credential instance supports the given algorithm parameter type.- Specified by:
- supportsParametersin interface- AlgorithmCredential
- Parameters:
- paramSpecClass- the parameter specification class (must not be- null)
- Returns:
- trueif the parameter type is supported,- falseotherwise
 
 - 
getParameterspublic <P extends AlgorithmParameterSpec> P getParameters(Class<P> paramSpecClass) Description copied from interface:AlgorithmCredentialGet the algorithm parameters of the given type from this credential.- Specified by:
- getParametersin interface- AlgorithmCredential
- Parameters:
- paramSpecClass- the parameter specification class (must not be- null)
- Returns:
- the parameter specification, or nullif no parameters are present or available or the given type was not supported by this credential
 
 - 
impliesSameParameterspublic boolean impliesSameParameters(AlgorithmCredential other) Description copied from interface:AlgorithmCredentialDetermine whether the other credential's parameters are implied by this one.- Specified by:
- impliesSameParametersin interface- AlgorithmCredential
- Parameters:
- other- the other credential (must not be- null)
- Returns:
- trueif the credentials have matching parameters,- falseotherwise
 
 - 
getAlgorithmpublic String getAlgorithm() Description copied from interface:AlgorithmCredentialGet the algorithm name associated with this credential (will never benull).- Specified by:
- getAlgorithmin interface- AlgorithmCredential
- Returns:
- the algorithm name
 
 - 
clonepublic KeyPairCredential clone() Description copied from interface:AlgorithmCredentialCreates and returns a copy of thisCredential.- Specified by:
- clonein interface- AlgorithmCredential
- Specified by:
- clonein interface- Credential
- Overrides:
- clonein class- Object
- Returns:
- a copy of this Credential.
 
 
- 
 
-