Package org.apache.cayenne.configuration
Interface PasswordEncoding
-
- All Known Implementing Classes:
PlainTextPasswordEncoder
,Rot13PasswordEncoder
,Rot47PasswordEncoder
public interface PasswordEncoding
Password encoders are used to translate the text of the database password, on loading and on saving, from one form to another. It can facilitate the obscuring of the password text to make database connection information less obvious to someone who stumbles onto the password. Cayenne only includes facilities to obscure, not encrypt, the database password. The mechanism is user-extensible, though, so should stronger security features be required, they can be added and integrated into both the modeler and framework.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
standardEncoders
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
decodePassword(String encodedPassword, String key)
Decodes an encoded database password.String
encodePassword(String normalPassword, String key)
Encodes a normal/plain database password.
-
-
-
Field Detail
-
standardEncoders
static final String[] standardEncoders
-
-
Method Detail
-
decodePassword
String decodePassword(String encodedPassword, String key)
Decodes an encoded database password.- Parameters:
encodedPassword
- - The encoded password to be decodedkey
- - An optional data element which can be used to unlock the password. Some encoders may require the key.- Returns:
- The decoded normal/plain password.
-
encodePassword
String encodePassword(String normalPassword, String key)
Encodes a normal/plain database password.- Parameters:
normalPassword
- - 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.- Returns:
- The encoded password.
-
-