org.apache.cayenne.conf
Class PlainTextPasswordEncoder

java.lang.Object
  extended by org.apache.cayenne.conf.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
Author:
Michael Gentry

Field Summary
 
Fields inherited from interface org.apache.cayenne.conf.PasswordEncoding
standardEncoders
 
Constructor Summary
PlainTextPasswordEncoder()
           
 
Method Summary
 String decodePassword(String encodedPassword, String salt)
          Decodes an encoded database password.
 String encodePassword(String normalPassword, String salt)
          Encodes a normal/plain database password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextPasswordEncoder

public PlainTextPasswordEncoder()
Method Detail

decodePassword

public String decodePassword(String encodedPassword,
                             String salt)
Description copied from interface: PasswordEncoding
Decodes an encoded database password.

Specified by:
decodePassword in interface PasswordEncoding
Parameters:
encodedPassword - - The encoded password to be decoded
salt - - An optional data element which can be used to salt the algorithm.
Returns:
The decoded normal/plain plassword.

encodePassword

public String encodePassword(String normalPassword,
                             String salt)
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 encoded
salt - - An optional data element which can be used to salt the algorithm.
Returns:
The encoded password.


Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.