Package org.apache.cayenne.configuration
Class PlainTextPasswordEncoder
- java.lang.Object
-
- org.apache.cayenne.configuration.PlainTextPasswordEncoder
-
- All Implemented Interfaces:
PasswordEncoding
public class PlainTextPasswordEncoder extends Object implements PasswordEncoding
The plain text password encoder passes the text of the database password straight-through without any alteration. This is identical to the behavior of pre-3.0 versions of Cayenne, where the password was stored in the XML model in clear text.- Since:
- 3.0
-
-
Field Summary
-
Fields inherited from interface org.apache.cayenne.configuration.PasswordEncoding
standardEncoders
-
-
Constructor Summary
Constructors Constructor Description PlainTextPasswordEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecodePassword(String encodedPassword, String key)Decodes an encoded database password.StringencodePassword(String normalPassword, String key)Encodes a normal/plain database password.
-
-
-
Method Detail
-
decodePassword
public String decodePassword(String encodedPassword, String key)
Description copied from interface:PasswordEncodingDecodes an encoded database password.- Specified by:
decodePasswordin interfacePasswordEncoding- 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
public String encodePassword(String normalPassword, String key)
Description copied from interface:PasswordEncodingEncodes a normal/plain database password.- Specified by:
encodePasswordin interfacePasswordEncoding- 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.
-
-