Class RawClearPassword
- java.lang.Object
-
- org.wildfly.security.password.interfaces.RawPassword
-
- org.wildfly.security.password.interfaces.RawClearPassword
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,Destroyable
,ClearPassword
,Password
,TwoWayPassword
class RawClearPassword extends RawPassword implements ClearPassword
-
-
Field Summary
Fields Modifier and Type Field Description private char[]
password
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.password.interfaces.ClearPassword
ALGORITHM_CLEAR
-
-
Constructor Summary
Constructors Constructor Description RawClearPassword(String algorithm, char[] password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawClearPassword
clone()
Creates and returns a copy of thisPassword
.void
destroy()
Destroy thisObject
.boolean
equals(Object obj)
char[]
getPassword()
Get the password characters.int
hashCode()
boolean
isDestroyed()
Determine if thisObject
has been destroyed.-
Methods inherited from class org.wildfly.security.password.interfaces.RawPassword
getAlgorithm, getEncoded, getFormat
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
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
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
password
private final char[] password
-
-
Constructor Detail
-
RawClearPassword
RawClearPassword(String algorithm, char[] password)
-
-
Method Detail
-
getPassword
public char[] getPassword() throws IllegalStateException
Description copied from interface:ClearPassword
Get the password characters.- Specified by:
getPassword
in interfaceClearPassword
- Returns:
- the password characters
- Throws:
IllegalStateException
-
destroy
public void destroy() throws DestroyFailedException
Destroy thisObject
.Sensitive information associated with this
Object
is destroyed or cleared. Subsequent calls to certain methods on thisObject
will result in anIllegalStateException
being thrown.The default implementation throws
DestroyFailedException
.- Specified by:
destroy
in interfaceDestroyable
- Throws:
DestroyFailedException
- if the destroy operation fails.SecurityException
- if the caller does not have permission to destroy thisObject
.
-
isDestroyed
public boolean isDestroyed()
Determine if thisObject
has been destroyed.The default implementation returns false.
- Specified by:
isDestroyed
in interfaceDestroyable
- Returns:
- true if this
Object
has been destroyed, false otherwise.
-
clone
public RawClearPassword clone()
Description copied from interface:Password
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfaceClearPassword
- Specified by:
clone
in interfacePassword
- Specified by:
clone
in interfaceTwoWayPassword
- Specified by:
clone
in classRawPassword
- Returns:
- a copy of this
Password
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classRawPassword
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in classRawPassword
-
-