Class RawMaskedPassword
- java.lang.Object
-
- org.wildfly.security.password.interfaces.RawPassword
-
- org.wildfly.security.password.interfaces.RawMaskedPassword
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,Destroyable
,MaskedPassword
,Password
,TwoWayPassword
final class RawMaskedPassword extends RawPassword implements MaskedPassword
- 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
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.password.interfaces.MaskedPassword
ALGORITHM_MASKED_HMAC_SHA1_AES_128, ALGORITHM_MASKED_HMAC_SHA1_AES_256, ALGORITHM_MASKED_HMAC_SHA224_AES_128, ALGORITHM_MASKED_HMAC_SHA224_AES_256, ALGORITHM_MASKED_HMAC_SHA256_AES_128, ALGORITHM_MASKED_HMAC_SHA256_AES_256, ALGORITHM_MASKED_HMAC_SHA384_AES_128, ALGORITHM_MASKED_HMAC_SHA384_AES_256, ALGORITHM_MASKED_HMAC_SHA512_AES_128, ALGORITHM_MASKED_HMAC_SHA512_AES_256, ALGORITHM_MASKED_MD5_3DES, ALGORITHM_MASKED_MD5_3DES_CBC_PKCS5, ALGORITHM_MASKED_MD5_DES, ALGORITHM_MASKED_MD5_DES_CBC_PKCS5, ALGORITHM_MASKED_PBKDF_HMAC_SHA1, ALGORITHM_MASKED_PBKDF_HMAC_SHA224, ALGORITHM_MASKED_PBKDF_HMAC_SHA256, ALGORITHM_MASKED_PBKDF_HMAC_SHA384, ALGORITHM_MASKED_PBKDF_HMAC_SHA512, ALGORITHM_MASKED_SHA1_DES_EDE, ALGORITHM_MASKED_SHA1_DES_EDE_CBC_PKCS5, ALGORITHM_MASKED_SHA1_RC2_128, ALGORITHM_MASKED_SHA1_RC2_128_CBC_PKCS5, ALGORITHM_MASKED_SHA1_RC2_40, ALGORITHM_MASKED_SHA1_RC2_40_CBC_PKCS5, ALGORITHM_MASKED_SHA1_RC4_128, ALGORITHM_MASKED_SHA1_RC4_128_ECB, ALGORITHM_MASKED_SHA1_RC4_40, ALGORITHM_MASKED_SHA1_RC4_40_ECB
-
-
Constructor Summary
Constructors Constructor Description RawMaskedPassword(String algorithm, char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes, byte[] initializationVector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawMaskedPassword
clone()
Creates and returns a copy of thisPassword
.boolean
equals(Object obj)
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()
-
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 javax.security.auth.Destroyable
destroy, isDestroyed
-
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
Methods inherited from interface org.wildfly.security.password.interfaces.MaskedPassword
getParameterSpec, impliesParameters
-
Methods inherited from interface org.wildfly.security.password.Password
castAndApply, castAndApply, castAs, castAs
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
initialKeyMaterial
private final char[] initialKeyMaterial
-
iterationCount
private final int iterationCount
-
salt
private final byte[] salt
-
maskedPasswordBytes
private final byte[] maskedPasswordBytes
-
initializationVector
private final byte[] initializationVector
-
-
Constructor Detail
-
RawMaskedPassword
RawMaskedPassword(String algorithm, char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes, byte[] initializationVector)
-
-
Method Detail
-
getInitialKeyMaterial
public char[] getInitialKeyMaterial()
Description copied from interface:MaskedPassword
Get the initial key material.- Specified by:
getInitialKeyMaterial
in interfaceMaskedPassword
- Returns:
- the initial key material (must not be
null
)
-
getIterationCount
public int getIterationCount()
Description copied from interface:MaskedPassword
Get the iteration count.- Specified by:
getIterationCount
in interfaceMaskedPassword
- Returns:
- the iteration count
-
getSalt
public byte[] getSalt()
Description copied from interface:MaskedPassword
Get the salt bytes.- Specified by:
getSalt
in interfaceMaskedPassword
- Returns:
- the salt bytes (must not be
null
)
-
getMaskedPasswordBytes
public byte[] getMaskedPasswordBytes()
Description copied from interface:MaskedPassword
Get the masked password bytes.- Specified by:
getMaskedPasswordBytes
in interfaceMaskedPassword
- Returns:
- the masked password bytes (must not be
null
)
-
getInitializationVector
public byte[] getInitializationVector()
Description copied from interface:MaskedPassword
Get the initialization vector.- Specified by:
getInitializationVector
in interfaceMaskedPassword
- Returns:
- the initialization vector (
null
if not used)
-
clone
public RawMaskedPassword clone()
Description copied from interface:Password
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfaceMaskedPassword
- 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
-
-