Interface SaltedSimpleDigestPassword
- 
- All Superinterfaces:
- Cloneable,- Key,- OneWayPassword,- Password,- Serializable
 - All Known Implementing Classes:
- RawSaltedSimpleDigestPassword,- SaltedSimpleDigestPasswordImpl
 
 public interface SaltedSimpleDigestPassword extends OneWayPassword A simple password where the generated digest also includes a salt.- Author:
- Darran Lofthouse
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringALGORITHM_PASSWORD_SALT_DIGEST_MD5Algorithm name for digest created using MD5 with the password digested first followed by the salt.static StringALGORITHM_PASSWORD_SALT_DIGEST_SHA_1Algorithm name for digest created using SHA-1 with the password digested first followed by the salt.static StringALGORITHM_PASSWORD_SALT_DIGEST_SHA_256Algorithm name for digest created using SHA-256 with the password digested first followed by the salt.static StringALGORITHM_PASSWORD_SALT_DIGEST_SHA_384Algorithm name for digest created using SHA-384 with the password digested first followed by the salt.static StringALGORITHM_PASSWORD_SALT_DIGEST_SHA_512Algorithm name for digest created using SHA-512 with the password digested first followed by the salt.static StringALGORITHM_SALT_PASSWORD_DIGEST_MD5Algorithm name for digest created using MD5 with the salt digested first followed by the password.static StringALGORITHM_SALT_PASSWORD_DIGEST_SHA_1Algorithm name for digest created using SHA-1 with the salt digested first followed by the password.static StringALGORITHM_SALT_PASSWORD_DIGEST_SHA_256Algorithm name for digest created using SHA-256 with the salt digested first followed by the password.static StringALGORITHM_SALT_PASSWORD_DIGEST_SHA_384Algorithm name for digest created using SHA-384 with the salt digested first followed by the password.static StringALGORITHM_SALT_PASSWORD_DIGEST_SHA_512Algorithm name for digest created using SHA-512 with the salt digested first followed by the password.static intDEFAULT_SALT_SIZEThe default salt size (in bytes), used when generating a random salt.- 
Fields inherited from interface java.security.KeyserialVersionUID
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SaltedSimpleDigestPasswordclone()Creates and returns a copy of thisPassword.static SaltedSimpleDigestPasswordcreateRaw(String algorithm, byte[] digest, byte[] salt)Create a raw implementation of this password type.byte[]getDigest()Get the digest represented by this password.default SaltedPasswordAlgorithmSpecgetParameterSpec()Get the applicable algorithm parameter specification for this password type.byte[]getSalt()Get the salt used to generate the digest.default booleanimpliesParameters(AlgorithmParameterSpec parameterSpec)Determine if this password is matched by the given parameter specification.- 
Methods inherited from interface java.security.KeygetAlgorithm, getEncoded, getFormat
 - 
Methods inherited from interface org.wildfly.security.password.PasswordcastAndApply, castAndApply, castAs, castAs
 
- 
 
- 
- 
- 
Field Detail- 
ALGORITHM_PASSWORD_SALT_DIGEST_MD5static final String ALGORITHM_PASSWORD_SALT_DIGEST_MD5 Algorithm name for digest created using MD5 with the password digested first followed by the salt.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_PASSWORD_SALT_DIGEST_SHA_1static final String ALGORITHM_PASSWORD_SALT_DIGEST_SHA_1 Algorithm name for digest created using SHA-1 with the password digested first followed by the salt.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_PASSWORD_SALT_DIGEST_SHA_256static final String ALGORITHM_PASSWORD_SALT_DIGEST_SHA_256 Algorithm name for digest created using SHA-256 with the password digested first followed by the salt.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_PASSWORD_SALT_DIGEST_SHA_384static final String ALGORITHM_PASSWORD_SALT_DIGEST_SHA_384 Algorithm name for digest created using SHA-384 with the password digested first followed by the salt.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_PASSWORD_SALT_DIGEST_SHA_512static final String ALGORITHM_PASSWORD_SALT_DIGEST_SHA_512 Algorithm name for digest created using SHA-512 with the password digested first followed by the salt.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_SALT_PASSWORD_DIGEST_MD5static final String ALGORITHM_SALT_PASSWORD_DIGEST_MD5 Algorithm name for digest created using MD5 with the salt digested first followed by the password.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_SALT_PASSWORD_DIGEST_SHA_1static final String ALGORITHM_SALT_PASSWORD_DIGEST_SHA_1 Algorithm name for digest created using SHA-1 with the salt digested first followed by the password.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_SALT_PASSWORD_DIGEST_SHA_256static final String ALGORITHM_SALT_PASSWORD_DIGEST_SHA_256 Algorithm name for digest created using SHA-256 with the salt digested first followed by the password.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_SALT_PASSWORD_DIGEST_SHA_384static final String ALGORITHM_SALT_PASSWORD_DIGEST_SHA_384 Algorithm name for digest created using SHA-384 with the salt digested first followed by the password.- See Also:
- Constant Field Values
 
 - 
ALGORITHM_SALT_PASSWORD_DIGEST_SHA_512static final String ALGORITHM_SALT_PASSWORD_DIGEST_SHA_512 Algorithm name for digest created using SHA-512 with the salt digested first followed by the password.- See Also:
- Constant Field Values
 
 - 
DEFAULT_SALT_SIZEstatic final int DEFAULT_SALT_SIZE The default salt size (in bytes), used when generating a random salt.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getDigestbyte[] getDigest() Get the digest represented by this password.- Returns:
- the digest represented by this password
 
 - 
getSaltbyte[] getSalt() Get the salt used to generate the digest.- Returns:
- the salt used to generate the digest
 
 - 
getParameterSpecdefault SaltedPasswordAlgorithmSpec getParameterSpec() Description copied from interface:PasswordGet the applicable algorithm parameter specification for this password type.- Specified by:
- getParameterSpecin interface- Password
- Returns:
- the algorithm parameter specification, or nullif this password type does not support algorithms
 
 - 
impliesParametersdefault boolean impliesParameters(AlgorithmParameterSpec parameterSpec) Description copied from interface:PasswordDetermine if this password is matched by the given parameter specification.- Specified by:
- impliesParametersin interface- Password
- Parameters:
- parameterSpec- the parameter specification (must not be- null)
- Returns:
- trueif the password is matched by the parameters,- falseotherwise
 
 - 
cloneSaltedSimpleDigestPassword clone() Creates and returns a copy of thisPassword.- Specified by:
- clonein interface- OneWayPassword
- Specified by:
- clonein interface- Password
- Returns:
- a copy of this Password.
 
 - 
createRawstatic SaltedSimpleDigestPassword createRaw(String algorithm, byte[] digest, byte[] salt) 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 name
- digest- the digest
- salt- the salt
- Returns:
- the raw password implementation
 
 
- 
 
-