org.apache.cayenne.configuration
Class PlainTextPasswordEncoder
java.lang.Object
org.apache.cayenne.configuration.PlainTextPasswordEncoder
- All Implemented Interfaces:
- PasswordEncoding
public class PlainTextPasswordEncoder
- extends java.lang.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
Method Summary |
java.lang.String |
decodePassword(java.lang.String encodedPassword,
java.lang.String key)
Decodes an encoded database password. |
java.lang.String |
encodePassword(java.lang.String normalPassword,
java.lang.String key)
Encodes a normal/plain database password. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainTextPasswordEncoder
public PlainTextPasswordEncoder()
decodePassword
public java.lang.String decodePassword(java.lang.String encodedPassword,
java.lang.String key)
- Description copied from interface:
PasswordEncoding
- Decodes an encoded database password.
- Specified by:
decodePassword
in interface PasswordEncoding
- 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 plassword.
encodePassword
public java.lang.String encodePassword(java.lang.String normalPassword,
java.lang.String key)
- Description copied from interface:
PasswordEncoding
- Encodes a normal/plain database password.
- Specified by:
encodePassword
in interface PasswordEncoding
- 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.
Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.