|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.conf.Rot47PasswordEncoder
public class Rot47PasswordEncoder
The ROT-47 password encoder passes the text of the database password through a simple Caesar cipher to obscure the password text. The ROT-47 cipher is similar to the ROT-13 cipher, but processes numbers and symbols as well. See the Wikipedia entry on ROT13 for more information on this topic.
| Field Summary |
|---|
| Fields inherited from interface org.apache.cayenne.conf.PasswordEncoding |
|---|
standardEncoders |
| Constructor Summary | |
|---|---|
Rot47PasswordEncoder()
|
|
| Method Summary | |
|---|---|
String |
decodePassword(String encodedPassword,
String key)
Decodes an encoded database password. |
String |
encodePassword(String normalPassword,
String key)
Encodes a normal/plain database password. |
static void |
main(String[] args)
Small test program to run text through the ROT-47 cipher. |
String |
rotate(String value)
Applies a ROT-47 Caesar cipher to the supplied value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Rot47PasswordEncoder()
| Method Detail |
|---|
public String decodePassword(String encodedPassword,
String key)
PasswordEncoding
decodePassword in interface PasswordEncodingencodedPassword - - The encoded password to be decodedkey - - An optional data element which can be used to unlock the password.
Some encoders may require the key.
public String encodePassword(String normalPassword,
String key)
PasswordEncoding
encodePassword in interface PasswordEncodingnormalPassword - - The normal/plain password to be encodedkey - - An optional data element which can be used to lock the password.
Some encoders may require the key.
public String rotate(String value)
A Unix command to perform a ROT-47 cipher is:
tr '!-~' 'P-~!-O'
value - The text to be rotated.
public static void main(String[] args)
args - The array of text values (on the command-line) to be run
through the ROT-47 cipher.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||