|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuserman.HashedPassword
public class HashedPassword
This class allows the creation and comparing of hashed passwords. Hashed passwords are stored in databases instead of in their clear text form in case password files are compromised.
| Constructor Summary | |
|---|---|
HashedPassword(byte[] hashBytes)
Use this constructor after retrieving a user's hashed password from the database. |
|
HashedPassword(java.lang.String password,
java.lang.String algorithm)
Use this constructor when a user is submitting credentials for login. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Use this to test hashed password equality. |
byte[] |
getHashBytes()
Use this accessor to get the hash string from a hashed password in order to store the string in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashedPassword(java.lang.String password,
java.lang.String algorithm)
password - the password as a stringalgorithm - the hash algorithm to use, for example "SHA-512"public HashedPassword(byte[] hashBytes)
hashBytes - the hashed byte string stored in the database| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other hashed password object
public byte[] getHashBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||