Package org.wildfly.security.credential
Class SecretKeyCredential
java.lang.Object
org.wildfly.security.credential.SecretKeyCredential
- All Implemented Interfaces:
Cloneable,AlgorithmCredential,Credential
A secret key credential.
-
Field Summary
Fields inherited from interface org.wildfly.security.credential.Credential
NO_CREDENTIALS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of thisCredential.booleanGet the algorithm name associated with this credential (will never benull).<P extends AlgorithmParameterSpec>
PgetParameters(Class<P> paramSpecClass) Get the algorithm parameters of the given type from this credential.Get the secret key.inthashCode()booleanDetermine 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.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.credential.AlgorithmCredential
getParameters, impliesParameters, matches, matches, matches, supportsParametersMethods inherited from interface org.wildfly.security.credential.Credential
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, verify, verify
-
Constructor Details
-
SecretKeyCredential
Construct a new instance.- Parameters:
secretKey- the secret key (may not benull)
-
-
Method Details
-
getSecretKey
Get the secret key.- Returns:
- the secret key (not
null)
-
supportsParameters
Description copied from interface:AlgorithmCredentialDetermine whether this credential instance supports the given algorithm parameter type.- Specified by:
supportsParametersin interfaceAlgorithmCredential- Parameters:
paramSpecClass- the parameter specification class (must not benull)- Returns:
trueif the parameter type is supported,falseotherwise
-
getParameters
Description copied from interface:AlgorithmCredentialGet the algorithm parameters of the given type from this credential.- Specified by:
getParametersin interfaceAlgorithmCredential- 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
-
impliesSameParameters
Description copied from interface:AlgorithmCredentialDetermine whether the other credential's parameters are implied by this one.- Specified by:
impliesSameParametersin interfaceAlgorithmCredential- Parameters:
other- the other credential (must not benull)- Returns:
trueif the credentials have matching parameters,falseotherwise
-
getAlgorithm
Description copied from interface:AlgorithmCredentialGet the algorithm name associated with this credential (will never benull).- Specified by:
getAlgorithmin interfaceAlgorithmCredential- Returns:
- the algorithm name
-
clone
Description copied from interface:AlgorithmCredentialCreates and returns a copy of thisCredential.- Specified by:
clonein interfaceAlgorithmCredential- Specified by:
clonein interfaceCredential- Overrides:
clonein classObject- Returns:
- a copy of this
Credential.
-
hashCode
public int hashCode() -
equals
-