public abstract class AbstractPasswordHashCreatorPBKDF2 extends AbstractPasswordHashCreator
IPasswordHashCreator using the PBKDF2 algorithm.| Modifier and Type | Field and Description |
|---|---|
static String |
PBKDF2_ALGORITHM |
| Constructor and Description |
|---|
AbstractPasswordHashCreatorPBKDF2(String sAlgorithm) |
| Modifier and Type | Method and Description |
|---|---|
protected static byte[] |
pbkdf2(char[] aPassword,
byte[] aSalt,
int nIterations,
int nBytes)
Computes the PBKDF2 hash of a password.
|
boolean |
requiresSalt() |
getAlgorithmName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreatePasswordHashpublic static final String PBKDF2_ALGORITHM
public final boolean requiresSalt()
true if this hash creator requires a salt,
false if not.@Nonnull protected static final byte[] pbkdf2(@Nonnull char[] aPassword, @Nonnull byte[] aSalt, @Nonnegative int nIterations, @Nonnegative int nBytes)
aPassword - the password to hash.aSalt - the saltnIterations - the iteration count (slowness factor)nBytes - the length of the hash to compute in bytesCopyright © 2014–2015 Philip Helger. All rights reserved.