|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.AbstractDigester
public abstract class AbstractDigester
Provides common implementation for password rules that use a digest.
| Field Summary | |
|---|---|
protected edu.vt.middleware.crypt.util.Converter |
converter
Converter to use in conjunction with the digest. |
protected edu.vt.middleware.crypt.digest.DigestAlgorithm |
digest
Digest object to use if comparing hashed passwords. |
| Constructor Summary | |
|---|---|
AbstractDigester()
|
|
| Method Summary | |
|---|---|
protected byte[] |
addSalt(byte[] data,
byte[] salt)
Concatenates the supplied salt to the supplied data. |
protected byte[] |
extractSalt(byte[] hash,
int length)
Extracts a salt from the end of the supplied hash. |
protected boolean |
matches(String undigested,
String reference)
Determines whether an undigested password matches a (possibly digested) reference value. |
void |
setDigest(String algorithm,
edu.vt.middleware.crypt.util.Converter conv)
This will set the supplied digest algorithm to be used when password comparison are made. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected edu.vt.middleware.crypt.digest.DigestAlgorithm digest
protected edu.vt.middleware.crypt.util.Converter converter
| Constructor Detail |
|---|
public AbstractDigester()
| Method Detail |
|---|
public void setDigest(String algorithm,
edu.vt.middleware.crypt.util.Converter conv)
DigestAlgorithm.
algorithm - to use for hashingconv - to convert bytes to string
protected boolean matches(String undigested,
String reference)
undigested - candidate clear text password.reference - reference password (possibly digested).
protected byte[] extractSalt(byte[] hash,
int length)
hash - to read salt fromlength - of the salt to extract
protected byte[] addSalt(byte[] data,
byte[] salt)
data - to concatenate salt tosalt - to concatenate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||