public final class SecretKeyCredential extends Object implements AlgorithmCredential
NO_CREDENTIALS
Constructor and Description |
---|
SecretKeyCredential(SecretKey secretKey)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
SecretKeyCredential |
clone()
Creates and returns a copy of this
Credential . |
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name associated with this credential (will never be
null ). |
<P extends AlgorithmParameterSpec> |
getParameters(Class<P> paramSpecClass)
Get the algorithm parameters of the given type from this credential.
|
SecretKey |
getSecretKey()
Get the secret key.
|
int |
hashCode() |
boolean |
impliesSameParameters(AlgorithmCredential other)
Determine whether the other credential's parameters are implied by this one.
|
boolean |
supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
Determine whether this credential instance supports the given algorithm parameter type.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getParameters, impliesParameters, matches, matches, matches, supportsParameters
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, fromKeyStoreEntry, verify, verify
public SecretKeyCredential(SecretKey secretKey)
secretKey
- the secret key (may not be null
)public SecretKey getSecretKey()
null
)public boolean supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
AlgorithmCredential
supportsParameters
in interface AlgorithmCredential
paramSpecClass
- the parameter specification class (must not be null
)true
if the parameter type is supported, false
otherwisepublic <P extends AlgorithmParameterSpec> P getParameters(Class<P> paramSpecClass)
AlgorithmCredential
getParameters
in interface AlgorithmCredential
paramSpecClass
- the parameter specification class (must not be null
)null
if no parameters are present or available or the given type
was not supported by this credentialpublic boolean impliesSameParameters(AlgorithmCredential other)
AlgorithmCredential
impliesSameParameters
in interface AlgorithmCredential
other
- the other credential (must not be null
)true
if the credentials have matching parameters, false
otherwisepublic String getAlgorithm()
AlgorithmCredential
null
).getAlgorithm
in interface AlgorithmCredential
public SecretKeyCredential clone()
AlgorithmCredential
Credential
.clone
in interface AlgorithmCredential
clone
in interface Credential
clone
in class Object
Credential
.Copyright © 2017 JBoss by Red Hat. All rights reserved.