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[]hashprivate intiterationCountprivate byte[]saltprivate static longserialVersionUID-
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 RawBCryptPasswordclone()Creates and returns a copy of thisPassword.booleanequals(Object obj)byte[]getHash()Get the hash segment of this password.intgetIterationCount()Get the iteration count of this password.byte[]getSalt()Get the salt segment of this password.inthashCode()-
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:BCryptPasswordGet the hash segment of this password.- Specified by:
getHashin interfaceBCryptPassword- Returns:
- the hash segment
-
getSalt
public byte[] getSalt()
Description copied from interface:BCryptPasswordGet the salt segment of this password.- Specified by:
getSaltin interfaceBCryptPassword- Returns:
- the salt segment
-
getIterationCount
public int getIterationCount()
Description copied from interface:BCryptPasswordGet the iteration count of this password.- Specified by:
getIterationCountin interfaceBCryptPassword- Returns:
- the iteration count
-
clone
public RawBCryptPassword clone()
Description copied from interface:PasswordCreates and returns a copy of thisPassword.- Specified by:
clonein interfaceBCryptPassword- Specified by:
clonein interfaceOneWayPassword- Specified by:
clonein interfacePassword- Specified by:
clonein classRawPassword- Returns:
- a copy of this
Password.
-
hashCode
public int hashCode()
- Specified by:
hashCodein classRawPassword
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin classRawPassword
-
-