Package org.wildfly.security.credential
Interface AlgorithmCredential
-
- All Superinterfaces:
Cloneable,Credential
- All Known Subinterfaces:
X509CertificateChainCredential
- All Known Implementing Classes:
AbstractX509CertificateChainCredential,KeyPairCredential,PasswordCredential,PublicKeyCredential,SecretKeyCredential,X509CertificateChainPrivateCredential,X509CertificateChainPublicCredential
public interface AlgorithmCredential extends Credential
A credential which has an associated algorithm name.
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.credential.Credential
NO_CREDENTIALS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AlgorithmCredentialclone()Creates and returns a copy of thisCredential.StringgetAlgorithm()Get the algorithm name associated with this credential (will never benull).default AlgorithmParameterSpecgetParameters()Get the default algorithm parameters of the any type from this credential.default <P extends AlgorithmParameterSpec>
PgetParameters(Class<P> paramSpecClass)Get the algorithm parameters of the given type from this credential.default booleanimpliesParameters(AlgorithmParameterSpec parameterSpec)Determine whether this credential implies the given parameters.default booleanimpliesSameParameters(AlgorithmCredential other)Determine whether the other credential's parameters are implied by this one.default booleanmatches(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)Determine if this credential matches the given criteria.default booleanmatches(AlgorithmCredential other)Determine if this credential is the same kind of credential as the given credential.default booleanmatches(Credential other)Determine if this credential is the same kind of credential as the given credential.default booleansupportsParameters()Determine whether this credential instance supports any algorithm parameter type.default booleansupportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)Determine whether this credential instance supports the given algorithm parameter type.-
Methods inherited from interface org.wildfly.security.credential.Credential
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, verify, verify
-
-
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
Get the algorithm name associated with this credential (will never benull).- Returns:
- the algorithm name
-
getParameters
default AlgorithmParameterSpec getParameters()
Get the default algorithm parameters of the any type from this credential.- Returns:
- the parameter specification, or
nullif no parameters are present or available or the given type was not supported by this credential
-
getParameters
default <P extends AlgorithmParameterSpec> P getParameters(Class<P> paramSpecClass)
Get the algorithm parameters of the given type from this credential.- Parameters:
paramSpecClass- the parameter specification class (must not benull)- Returns:
- the parameter specification, or
nullif no parameters are present or available or the given type was not supported by this credential
-
supportsParameters
default boolean supportsParameters()
Determine whether this credential instance supports any algorithm parameter type.- Returns:
trueif parameters are supported,falseotherwise
-
supportsParameters
default boolean supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
Determine whether this credential instance supports the given algorithm parameter type.- Parameters:
paramSpecClass- the parameter specification class (must not benull)- Returns:
trueif the parameter type is supported,falseotherwise
-
impliesParameters
default boolean impliesParameters(AlgorithmParameterSpec parameterSpec)
Determine whether this credential implies the given parameters. The default implementation returnsfalsealways.- Parameters:
parameterSpec- the parameters to test for (must not benull)- Returns:
trueif the given parameters match this credential,falseotherwise
-
impliesSameParameters
default boolean impliesSameParameters(AlgorithmCredential other)
Determine whether the other credential's parameters are implied by this one.- Parameters:
other- the other credential (must not benull)- Returns:
trueif the credentials have matching parameters,falseotherwise
-
clone
AlgorithmCredential clone()
Creates and returns a copy of thisCredential.- Specified by:
clonein interfaceCredential- Returns:
- a copy of this
Credential.
-
matches
default boolean matches(Credential other)
Description copied from interface:CredentialDetermine if this credential is the same kind of credential as the given credential.- Specified by:
matchesin interfaceCredential- Parameters:
other- the other credential- Returns:
trueif the credentials are of the same kind,falseotherwise
-
matches
default boolean matches(AlgorithmCredential other)
Description copied from interface:CredentialDetermine if this credential is the same kind of credential as the given credential.- Specified by:
matchesin interfaceCredential- Parameters:
other- the other credential- Returns:
trueif the credentials are of the same kind,falseotherwise
-
matches
default boolean matches(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
Description copied from interface:CredentialDetermine if this credential matches the given criteria.- Specified by:
matchesin interfaceCredential- Parameters:
credentialType- the credential type class to checkalgorithmName- the name of the algorithm ornullif any algorithm is acceptableparameterSpec- the parameter specification ornullif any parameter specification is acceptable- Returns:
trueif the credential matches the specification,falseotherwise
-
-