|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.auth.login.CleartextPasswordEncoder
Password encoder for the unencoded passwords.
This class encodes a user password by simply converting the given password argument to a string. It does not perform any particular encoding. Use it with a great caution since the cleartext passwords may be potentionally dangerous!
This class may be used to encode the ASCII-based passwords only.
Constructor Summary | |
CleartextPasswordEncoder()
|
Method Summary | |
boolean |
compare(java.lang.String encoded,
char[] plain)
Compares two passwords. |
java.lang.String |
encode(char[] password)
Encodes a single password. |
static java.lang.String |
encodePassword(char[] password)
Encodes a single password. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CleartextPasswordEncoder()
Method Detail |
public static java.lang.String encodePassword(char[] password)
password
- the password
public java.lang.String encode(char[] password)
PasswordEncoder
Note that two subsequent calls to this method with the same argument may result in two
different strings returned. Use the compare
method therefore
for comparing the encoded password with its plain format.
encode
in interface PasswordEncoder
password
- the password
public boolean compare(java.lang.String encoded, char[] plain)
PasswordEncoder
compare
in interface PasswordEncoder
encoded
- the encoded passwordplain
- the plain (non-encoded) password
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |