Constructs a PBKDF2 password encoder with no additional secret value. There will be
iterations and a hash width of . The default is based upon aiming for .5
seconds to validate the password when this class was added.. Users should tune
password verification to their own systems.
public Pbkdf2PasswordEncoder(java.lang.CharSequence secret)
Constructs a standard password encoder with a secret value which is also included
in the password hash. There will be iterations and a hash width of .
secret - the secret key used in the encoding process (should not be shared)
public Pbkdf2PasswordEncoder(java.lang.CharSequence secret,
Constructs a standard password encoder with a secret value as well as iterations
secret - the secret
iterations - the number of iterations. Users should aim for taking about .5
seconds on their own system.
hashWidth - the size of the hash
public java.lang.String encode(java.lang.CharSequence rawPassword)
Verify the encoded password obtained from storage matches the submitted raw
password after it too is encoded. Returns true if the passwords match, false if
they do not. The stored password itself is never decoded.