public class Rot47PasswordEncoder extends Object implements PasswordEncoding
standardEncoders| Constructor and Description |
|---|
Rot47PasswordEncoder() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public String decodePassword(String encodedPassword, String key)
PasswordEncodingdecodePassword 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)
PasswordEncodingencodePassword 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.Copyright © 2001–2018 Apache Cayenne. All rights reserved.