|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.crypto.passwd.internal.DefaultPasswordVerificationFunction
public class DefaultPasswordVerificationFunction
Default password verification function wraps a key derivation function and stores the hash output.
| Constructor Summary | |
|---|---|
DefaultPasswordVerificationFunction()
|
|
| Method Summary | |
|---|---|
void |
init(KeyDerivationFunction underlyingHashFunction,
byte[] password)
Initialize this function with the desired key length. |
boolean |
isPasswordCorrect(byte[] password)
Validate a user supplied password. |
byte[] |
serialize()
Store this function as a byte array so another function of the same class can be initialized with the same array and will then produce the same key for the given password. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPasswordVerificationFunction()
| Method Detail |
|---|
public void init(KeyDerivationFunction underlyingHashFunction,
byte[] password)
init in interface PasswordVerificationFunctionunderlyingHashFunction - the function which will be used when converting the password to a hash.password - the user supplied password to be verified later.PasswordVerificationFunction.init(KeyDerivationFunction, byte[])
public byte[] serialize()
throws java.io.IOException
serialize in interface PasswordVerificationFunctionjava.io.IOException - if something fails within the serialization framework.PasswordVerificationFunction.serialize()public boolean isPasswordCorrect(byte[] password)
isPasswordCorrect in interface PasswordVerificationFunctionpassword - the user supplied password.
PasswordVerificationFunction.init(KeyDerivationFunction, byte[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||