Interface DigestPassword
- All Superinterfaces:
Cloneable, Key, OneWayPassword, Password, Serializable
Digest MD5 (pre-digested) password.
- Author:
- Peter Skopek, Darran Lofthouse
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe algorithm name "digest-md5".static final StringThe algorithm name "digest-sha".static final StringThe algorithm name "digest-sha-256".static final StringThe algorithm name "digest-sha-384".static final StringThe algorithm name "digest-sha-512".static final StringThe algorithm name "digest-sha-512-256".Fields inherited from interface Key
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of thisPassword.static DigestPasswordCreate a raw implementation of this password type.byte[]Get the digest represented by thisPassword.default DigestPasswordAlgorithmSpecGet the applicable algorithm parameter specification for this password type.getRealm()Get the realm thisPasswordis associated with.Get the username thisPasswordis associated with.default booleanimpliesParameters(AlgorithmParameterSpec parameterSpec) Determine if this password is matched by the given parameter specification.Methods inherited from interface Key
getAlgorithm, getEncoded, getFormatMethods inherited from interface Password
castAndApply, castAndApply, castAs, castAs
-
Field Details
-
ALGORITHM_DIGEST_MD5
-
ALGORITHM_DIGEST_SHA
-
ALGORITHM_DIGEST_SHA_256
-
ALGORITHM_DIGEST_SHA_384
-
ALGORITHM_DIGEST_SHA_512
-
ALGORITHM_DIGEST_SHA_512_256
The algorithm name "digest-sha-512-256". (Using SHA-512/256)- See Also:
-
-
Method Details
-
getUsername
-
getRealm
-
getDigest
-
getParameterSpec
Description copied from interface:PasswordGet the applicable algorithm parameter specification for this password type.- Specified by:
getParameterSpecin interfacePassword- Returns:
- the algorithm parameter specification, or
nullif this password type does not support algorithms
-
impliesParameters
Description copied from interface:PasswordDetermine if this password is matched by the given parameter specification.- Specified by:
impliesParametersin interfacePassword- Parameters:
parameterSpec- the parameter specification (must not benull)- Returns:
trueif the password is matched by the parameters,falseotherwise
-
clone
DigestPassword clone()Creates and returns a copy of thisPassword.- Specified by:
clonein interfaceOneWayPassword- Specified by:
clonein interfacePassword- Returns:
- a copy of this
Password.
-
createRaw
Create a raw implementation of this password type. No validation of the content is performed, and the password must be "adopted" in to aPasswordFactory(via thePasswordFactory.translate(Password)method) before it can be validated and used to verify guesses.- Parameters:
algorithm- the algorithm nameusername- the user namerealm- the realmdigest- the digest- Returns:
- the raw password implementation
-