Class EncryptablePasswordSpec
- java.lang.Object
-
- org.wildfly.security.password.spec.EncryptablePasswordSpec
-
- All Implemented Interfaces:
KeySpec
,PasswordSpec
public final class EncryptablePasswordSpec extends Object implements PasswordSpec
A password specification for clear passwords which are intended to be encrypted or hashed.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description EncryptablePasswordSpec(char[] password, AlgorithmParameterSpec algorithmParameterSpec)
Construct a new instance.EncryptablePasswordSpec(char[] password, AlgorithmParameterSpec algorithmParameterSpec, Charset hashCharset)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
AlgorithmParameterSpec
getAlgorithmParameterSpec()
Get the algorithm parameter specification.Charset
getHashCharset()
Get the character set used in the password representationchar[]
getPassword()
Get the password characters.int
hashCode()
-
-
-
Constructor Detail
-
EncryptablePasswordSpec
public EncryptablePasswordSpec(char[] password, AlgorithmParameterSpec algorithmParameterSpec)
Construct a new instance.- Parameters:
password
- the password to be encrypted or hashedalgorithmParameterSpec
- the parameters of the algorithm to be used for encryption or hashing
-
EncryptablePasswordSpec
public EncryptablePasswordSpec(char[] password, AlgorithmParameterSpec algorithmParameterSpec, Charset hashCharset)
Construct a new instance.- Parameters:
password
- the password to be encrypted or hashedalgorithmParameterSpec
- the parameters of the algorithm to be used for encryption or hashinghashCharset
- the character set used in the password representation. Uses UTF-8 by default.
-
-
Method Detail
-
getPassword
public char[] getPassword()
Get the password characters.- Returns:
- the password characters
-
getAlgorithmParameterSpec
public AlgorithmParameterSpec getAlgorithmParameterSpec()
Get the algorithm parameter specification.- Returns:
- the algorithm parameter specification
-
getHashCharset
public Charset getHashCharset()
Get the character set used in the password representation- Returns:
- the character set
-
-