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[]passwordprivate static longserialVersionUID-
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 ClearPasswordImplclone()Creates and returns a copy of thisPassword.(package private) <T extends KeySpec>
booleanconvertibleTo(Class<T> keySpecType)voiddestroy()booleanequals(Object obj)StringgetAlgorithm()(package private) <S extends KeySpec>
SgetKeySpec(Class<S> keySpecType)char[]getPassword()Get the password characters.inthashCode()booleanisDestroyed()private voidreadObject(ObjectInputStream ignored)(package private) booleanverify(char[] guess)(package private) booleanverify(char[] guess, Charset hashCharset)(package private) ObjectwriteReplace()-
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:
getAlgorithmin interfaceKey
-
getPassword
public char[] getPassword() throws IllegalStateExceptionDescription copied from interface:ClearPasswordGet the password characters.- Specified by:
getPasswordin interfaceClearPassword- Returns:
- the password characters
- Throws:
IllegalStateException
-
destroy
public void destroy() throws DestroyFailedException- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceDestroyable
-
getKeySpec
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException
- Specified by:
getKeySpecin classAbstractPasswordImpl- Throws:
InvalidKeySpecException
-
verify
boolean verify(char[] guess)
- Specified by:
verifyin classAbstractPasswordImpl
-
verify
boolean verify(char[] guess, Charset hashCharset) throws InvalidKeyException- Overrides:
verifyin classAbstractPasswordImpl- Throws:
InvalidKeyException
-
convertibleTo
<T extends KeySpec> boolean convertibleTo(Class<T> keySpecType)
- Specified by:
convertibleToin classAbstractPasswordImpl
-
readObject
private void readObject(ObjectInputStream ignored) throws NotSerializableException
- Throws:
NotSerializableException
-
writeReplace
Object writeReplace()
-
clone
public ClearPasswordImpl clone()
Description copied from interface:PasswordCreates and returns a copy of thisPassword.- Specified by:
clonein interfaceClearPassword- Specified by:
clonein interfacePassword- Specified by:
clonein interfaceTwoWayPassword- Specified by:
clonein classAbstractPasswordImpl- Returns:
- a copy of this
Password.
-
hashCode
public int hashCode()
- Specified by:
hashCodein classAbstractPasswordImpl
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin classAbstractPasswordImpl
-
-