Interface ClearPassword
-
- All Superinterfaces:
Cloneable
,Destroyable
,Key
,Password
,Serializable
,TwoWayPassword
public interface ClearPassword extends TwoWayPassword
A simple clear-text password.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_CLEAR
The algorithm name.-
Fields inherited from interface java.security.Key
serialVersionUID
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description ClearPassword
clone()
Creates and returns a copy of thisPassword
.static ClearPassword
createRaw(String algorithm, char[] password)
Create a raw implementation of this password type.char[]
getPassword()
Get the password characters.-
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
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_CLEAR
static final String ALGORITHM_CLEAR
The algorithm name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPassword
char[] getPassword() throws IllegalStateException
Get the password characters.- Returns:
- the password characters
- Throws:
IllegalStateException
-
clone
ClearPassword clone()
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfacePassword
- Specified by:
clone
in interfaceTwoWayPassword
- Returns:
- a copy of this
Password
.
-
createRaw
static ClearPassword createRaw(String algorithm, char[] password)
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 namepassword
- the password characters- Returns:
- the raw password implementation
-
-