public interface DigestPassword extends OneWayPassword
Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM_DIGEST_MD5
The algorithm name "digest-md5".
|
static String |
ALGORITHM_DIGEST_SHA
The algorithm name "digest-sha".
|
static String |
ALGORITHM_DIGEST_SHA_256
The algorithm name "digest-sha-256".
|
static String |
ALGORITHM_DIGEST_SHA_384
The algorithm name "digest-sha-384".
|
static String |
ALGORITHM_DIGEST_SHA_512
The algorithm name "digest-sha-512".
|
static String |
ALGORITHM_DIGEST_SHA_512_256
The algorithm name "digest-sha-512-256".
|
serialVersionUID
Modifier and Type | Method and Description |
---|---|
DigestPassword |
clone()
Creates and returns a copy of this
Password . |
static DigestPassword |
createRaw(String algorithm,
String username,
String realm,
byte[] digest)
Create a raw implementation of this password type.
|
byte[] |
getDigest()
Get the digest represented by this
Password . |
default DigestPasswordAlgorithmSpec |
getParameterSpec()
Get the applicable algorithm parameter specification for this password type.
|
String |
getRealm()
Get the realm this
Password is associated with. |
String |
getUsername()
Get the username this
Password is associated with. |
default boolean |
impliesParameters(AlgorithmParameterSpec parameterSpec)
Determine if this password is matched by the given parameter specification.
|
castAndApply, castAndApply, castAs, castAs
getAlgorithm, getEncoded, getFormat
static final String ALGORITHM_DIGEST_MD5
static final String ALGORITHM_DIGEST_SHA
static final String ALGORITHM_DIGEST_SHA_256
static final String ALGORITHM_DIGEST_SHA_384
static final String ALGORITHM_DIGEST_SHA_512
static final String ALGORITHM_DIGEST_SHA_512_256
String getUsername()
Password
is associated with.
Generally a Password
should not need to know this information but this is an integral part of how the
representation of this Password
is created.
Password
is associated withString getRealm()
Password
is associated with.
Note: This is independent of the name of the realm used to obtain the Password
representation, this is the value
used to generate the digest.
Password
is associated withbyte[] getDigest()
Password
.Password
default DigestPasswordAlgorithmSpec getParameterSpec()
Password
getParameterSpec
in interface Password
null
if this password type does not support algorithmsdefault boolean impliesParameters(AlgorithmParameterSpec parameterSpec)
Password
impliesParameters
in interface Password
parameterSpec
- the parameter specification (must not be null
)true
if the password is matched by the parameters, false
otherwiseDigestPassword clone()
Password
.clone
in interface OneWayPassword
clone
in interface Password
Password
.static DigestPassword createRaw(String algorithm, String username, String realm, byte[] digest)
PasswordFactory
(via the PasswordFactory.translate(Password)
method)
before it can be validated and used to verify guesses.algorithm
- the algorithm nameusername
- the user namerealm
- the realmdigest
- the digestCopyright © 2020 JBoss by Red Hat. All rights reserved.