Class ClearPasswordImpl
- java.lang.Object
-
- org.wildfly.security.password.impl.AbstractPasswordImpl
-
- org.wildfly.security.password.impl.ClearPasswordImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,Destroyable
,ClearPassword
,Password
,TwoWayPassword
final class ClearPasswordImpl extends AbstractPasswordImpl 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 ClearPasswordImpl(char[] password)
ClearPasswordImpl(ClearPassword clearPassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClearPasswordImpl
clone()
Creates and returns a copy of thisPassword
.(package private) <T extends KeySpec>
booleanconvertibleTo(Class<T> keySpecType)
void
destroy()
boolean
equals(Object obj)
String
getAlgorithm()
(package private) <S extends KeySpec>
SgetKeySpec(Class<S> keySpecType)
char[]
getPassword()
Get the password characters.int
hashCode()
boolean
isDestroyed()
private void
readObject(ObjectInputStream ignored)
(package private) boolean
verify(char[] guess)
(package private) boolean
verify(char[] guess, Charset hashCharset)
(package private) Object
writeReplace()
-
Methods inherited from class org.wildfly.security.password.impl.AbstractPasswordImpl
getEncoded, getFormat, getNormalizedPasswordBytes, getNormalizedPasswordBytes, translate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.security.Key
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 char[] password
-
-
Constructor Detail
-
ClearPasswordImpl
ClearPasswordImpl(char[] password)
-
ClearPasswordImpl
ClearPasswordImpl(ClearPassword clearPassword)
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
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
- Specified by:
destroy
in interfaceDestroyable
- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfaceDestroyable
-
getKeySpec
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException
- Specified by:
getKeySpec
in classAbstractPasswordImpl
- Throws:
InvalidKeySpecException
-
verify
boolean verify(char[] guess)
- Specified by:
verify
in classAbstractPasswordImpl
-
verify
boolean verify(char[] guess, Charset hashCharset) throws InvalidKeyException
- Overrides:
verify
in classAbstractPasswordImpl
- Throws:
InvalidKeyException
-
convertibleTo
<T extends KeySpec> boolean convertibleTo(Class<T> keySpecType)
- Specified by:
convertibleTo
in classAbstractPasswordImpl
-
readObject
private void readObject(ObjectInputStream ignored) throws NotSerializableException
- Throws:
NotSerializableException
-
writeReplace
Object writeReplace()
-
clone
public ClearPasswordImpl 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 classAbstractPasswordImpl
- Returns:
- a copy of this
Password
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classAbstractPasswordImpl
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in classAbstractPasswordImpl
-
-