Class MaskedPasswordSpec
- java.lang.Object
-
- org.wildfly.security.password.spec.MaskedPasswordSpec
-
- All Implemented Interfaces:
KeySpec
,PasswordSpec
public final class MaskedPasswordSpec extends Object implements PasswordSpec
A password specification for a two-way password which is masked.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
initializationVector
private char[]
initialKeyMaterial
private int
iterationCount
private byte[]
maskedPasswordBytes
private byte[]
salt
-
Constructor Summary
Constructors Constructor Description MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes)
Construct a new instance.MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes, byte[] initializationVector)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
byte[]
getInitializationVector()
Get the initialization vector.char[]
getInitialKeyMaterial()
Get the initial key material.int
getIterationCount()
Get the iteration count.byte[]
getMaskedPasswordBytes()
Get the masked password bytes.byte[]
getSalt()
Get the salt bytes.int
hashCode()
-
-
-
Constructor Detail
-
MaskedPasswordSpec
public MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes)
Construct a new instance.- Parameters:
initialKeyMaterial
- the initial key material (must not benull
)iterationCount
- the iteration countsalt
- the salt bytes (must not benull
)maskedPasswordBytes
- the masked password bytes (must not benull
)
-
MaskedPasswordSpec
public MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes, byte[] initializationVector)
Construct a new instance.- Parameters:
initialKeyMaterial
- the initial key material (must not benull
)iterationCount
- the iteration countsalt
- the salt bytes (must not benull
)maskedPasswordBytes
- the masked password bytes (must not benull
)initializationVector
- the initialization vector (can benull
)
-
-
Method Detail
-
getInitialKeyMaterial
public char[] getInitialKeyMaterial()
Get the initial key material.- Returns:
- the initial key material (must not be
null
)
-
getIterationCount
public int getIterationCount()
Get the iteration count.- Returns:
- the iteration count
-
getSalt
public byte[] getSalt()
Get the salt bytes.- Returns:
- the salt bytes (must not be
null
)
-
getMaskedPasswordBytes
public byte[] getMaskedPasswordBytes()
Get the masked password bytes.- Returns:
- the masked password bytes (must not be
null
)
-
getInitializationVector
public byte[] getInitializationVector()
Get the initialization vector.- Returns:
- the initialization vector (can be
null
)
-
-