@Nonnegative @Immutable public final class PasswordSaltBCrypt extends Object implements IPasswordSalt
IPasswordSalt using BCrypt.gensalt(int).| Constructor and Description |
|---|
PasswordSaltBCrypt()
Create a new BCrypt password salt with the default rounds of
.
|
PasswordSaltBCrypt(int nRounds)
Constructor to create a new BCrypt password salt with the provided rounds.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getSaltByteCount() |
byte[] |
getSaltBytes() |
String |
getSaltString() |
int |
hashCode() |
String |
toString() |
public PasswordSaltBCrypt()
public PasswordSaltBCrypt(@Nonnegative int nRounds)
nRounds - the log2 of the number of rounds of hashing to apply - the work
factor therefore increases as 2**log_rounds.@Nonnegative public int getSaltByteCount()
getSaltByteCount in interface IPasswordSalt@Nonnull @Nonempty @ReturnsMutableCopy public byte[] getSaltBytes()
getSaltBytes in interface IPasswordSaltnull nor empty.@Nonnull @Nonempty public String getSaltString()
getSaltString in interface IPasswordSaltnull nor empty.Copyright © 2016–2021 Philip Helger. All rights reserved.