Interface SimpleDigestPassword
- All Superinterfaces:
Cloneable,Key,OneWayPassword,Password,Serializable
A simple single digest based password.
- Author:
- David M. Lloyd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe algorithm name "simple-digest-md2".static final StringThe algorithm name "simple-digest-md5".static final StringThe algorithm name "simple-digest-sha-1".static final StringThe algorithm name "simple-digest-sha-256".static final StringThe algorithm name "simple-digest-sha-384".static final StringThe algorithm name "simple-digest-sha-512".Fields inherited from interface java.security.Key
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of thisPassword.static SimpleDigestPasswordCreate a raw implementation of this password type.byte[]Get the digest of this password.Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormatMethods inherited from interface org.wildfly.security.password.Password
castAndApply, castAndApply, castAs, castAs, getParameterSpec, impliesParameters
-
Field Details
-
ALGORITHM_SIMPLE_DIGEST_MD2
The algorithm name "simple-digest-md2".- See Also:
-
ALGORITHM_SIMPLE_DIGEST_MD5
The algorithm name "simple-digest-md5".- See Also:
-
ALGORITHM_SIMPLE_DIGEST_SHA_1
The algorithm name "simple-digest-sha-1".- See Also:
-
ALGORITHM_SIMPLE_DIGEST_SHA_256
The algorithm name "simple-digest-sha-256".- See Also:
-
ALGORITHM_SIMPLE_DIGEST_SHA_384
The algorithm name "simple-digest-sha-384".- See Also:
-
ALGORITHM_SIMPLE_DIGEST_SHA_512
The algorithm name "simple-digest-sha-512".- See Also:
-
-
Method Details
-
getDigest
byte[] getDigest()Get the digest of this password.- Returns:
- the digest
-
clone
SimpleDigestPassword 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 namedigest- the digest- Returns:
- the raw password implementation
-