|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PasswordVerificationFunction
Password verification function differes from key derivation function in that password verification function stores the hashed password given it. While this is quite wrong for encryption, it is exactly what is needed for verifying a password. Implementations are expected to wrap a key derivation function and store it's output.
| 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. |
| Method Detail |
|---|
void init(KeyDerivationFunction underlyingHashFunction,
byte[] password)
underlyingHashFunction - the function which will be used when converting the password to a hash.password - the user supplied password to be verified later.
byte[] serialize()
throws IOException
IOException - if something fails within the serialization framework.boolean isPasswordCorrect(byte[] password)
password - the user supplied password.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||