Interface SimpleDigestPassword
-
- All Superinterfaces:
Cloneable,Key,OneWayPassword,Password,Serializable
public interface SimpleDigestPassword extends OneWayPassword
A simple single digest based password.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static StringALGORITHM_SIMPLE_DIGEST_MD2The algorithm name "simple-digest-md2".static StringALGORITHM_SIMPLE_DIGEST_MD5The algorithm name "simple-digest-md5".static StringALGORITHM_SIMPLE_DIGEST_SHA_1The algorithm name "simple-digest-sha-1".static StringALGORITHM_SIMPLE_DIGEST_SHA_256The algorithm name "simple-digest-sha-256".static StringALGORITHM_SIMPLE_DIGEST_SHA_384The algorithm name "simple-digest-sha-384".static StringALGORITHM_SIMPLE_DIGEST_SHA_512The algorithm name "simple-digest-sha-512".-
Fields inherited from interface java.security.Key
serialVersionUID
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description SimpleDigestPasswordclone()Creates and returns a copy of thisPassword.static SimpleDigestPasswordcreateRaw(String algorithm, byte[] digest)Create a raw implementation of this password type.byte[]getDigest()Get the digest of this password.-
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
Methods inherited from interface org.wildfly.security.password.Password
castAndApply, castAndApply, castAs, castAs, getParameterSpec, impliesParameters
-
-
-
-
Field Detail
-
ALGORITHM_SIMPLE_DIGEST_MD2
static final String ALGORITHM_SIMPLE_DIGEST_MD2
The algorithm name "simple-digest-md2".- See Also:
- Constant Field Values
-
ALGORITHM_SIMPLE_DIGEST_MD5
static final String ALGORITHM_SIMPLE_DIGEST_MD5
The algorithm name "simple-digest-md5".- See Also:
- Constant Field Values
-
ALGORITHM_SIMPLE_DIGEST_SHA_1
static final String ALGORITHM_SIMPLE_DIGEST_SHA_1
The algorithm name "simple-digest-sha-1".- See Also:
- Constant Field Values
-
ALGORITHM_SIMPLE_DIGEST_SHA_256
static final String ALGORITHM_SIMPLE_DIGEST_SHA_256
The algorithm name "simple-digest-sha-256".- See Also:
- Constant Field Values
-
ALGORITHM_SIMPLE_DIGEST_SHA_384
static final String ALGORITHM_SIMPLE_DIGEST_SHA_384
The algorithm name "simple-digest-sha-384".- See Also:
- Constant Field Values
-
ALGORITHM_SIMPLE_DIGEST_SHA_512
static final String ALGORITHM_SIMPLE_DIGEST_SHA_512
The algorithm name "simple-digest-sha-512".- See Also:
- Constant Field Values
-
-
Method Detail
-
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
static SimpleDigestPassword createRaw(String algorithm, byte[] digest)
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
-
-