Class RawBCryptPassword
- java.lang.Object
-
- org.wildfly.security.password.interfaces.RawPassword
-
- org.wildfly.security.password.interfaces.RawBCryptPassword
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,BCryptPassword
,OneWayPassword
,Password
class RawBCryptPassword extends RawPassword implements BCryptPassword
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
hash
private int
iterationCount
private byte[]
salt
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.password.interfaces.BCryptPassword
ALGORITHM_BCRYPT, BCRYPT_HASH_SIZE, BCRYPT_SALT_SIZE, DEFAULT_ITERATION_COUNT
-
-
Constructor Summary
Constructors Constructor Description RawBCryptPassword(String algorithm, byte[] hash, byte[] salt, int iterationCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawBCryptPassword
clone()
Creates and returns a copy of thisPassword
.boolean
equals(Object obj)
byte[]
getHash()
Get the hash segment of this password.int
getIterationCount()
Get the iteration count of this password.byte[]
getSalt()
Get the salt segment of this password.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 org.wildfly.security.password.interfaces.BCryptPassword
getParameterSpec, impliesParameters
-
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
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
-
hash
private final byte[] hash
-
salt
private final byte[] salt
-
iterationCount
private final int iterationCount
-
-
Constructor Detail
-
RawBCryptPassword
RawBCryptPassword(String algorithm, byte[] hash, byte[] salt, int iterationCount)
-
-
Method Detail
-
getHash
public byte[] getHash()
Description copied from interface:BCryptPassword
Get the hash segment of this password.- Specified by:
getHash
in interfaceBCryptPassword
- Returns:
- the hash segment
-
getSalt
public byte[] getSalt()
Description copied from interface:BCryptPassword
Get the salt segment of this password.- Specified by:
getSalt
in interfaceBCryptPassword
- Returns:
- the salt segment
-
getIterationCount
public int getIterationCount()
Description copied from interface:BCryptPassword
Get the iteration count of this password.- Specified by:
getIterationCount
in interfaceBCryptPassword
- Returns:
- the iteration count
-
clone
public RawBCryptPassword clone()
Description copied from interface:Password
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfaceBCryptPassword
- Specified by:
clone
in interfaceOneWayPassword
- Specified by:
clone
in interfacePassword
- 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
-
-