org.apache.openejb.resource.jdbc
Class StaticDESPasswordCipher

java.lang.Object
  extended by org.apache.openejb.resource.jdbc.StaticDESPasswordCipher
All Implemented Interfaces:
PasswordCipher

public class StaticDESPasswordCipher
extends java.lang.Object
implements PasswordCipher

This PasswordCipher implementation uses a the Triple-DES encryption algorithm.


Constructor Summary
StaticDESPasswordCipher()
           
 
Method Summary
 java.lang.String decrypt(char[] encodedPassword)
          Decodes an encoded password and returns a plain text password.
 char[] encrypt(java.lang.String plainPassword)
          Encodes a given plain text password and returns the encoded password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticDESPasswordCipher

public StaticDESPasswordCipher()
Method Detail

encrypt

public char[] encrypt(java.lang.String plainPassword)
Description copied from interface: PasswordCipher
Encodes a given plain text password and returns the encoded password.

Specified by:
encrypt in interface PasswordCipher
Parameters:
plainPassword - The password to encode. May not be null, nor empty.
Returns:
The encoded password.
Throws:
java.lang.RuntimeException - in any case of error.
See Also:
PasswordCipher.encrypt(java.lang.String)

decrypt

public java.lang.String decrypt(char[] encodedPassword)
Description copied from interface: PasswordCipher
Decodes an encoded password and returns a plain text password.

Specified by:
decrypt in interface PasswordCipher
Parameters:
encodedPassword - The ciphered password to decode. May not be null, nor empty.
Returns:
The plain text password.
Throws:
java.lang.RuntimeException - in any case of error.
See Also:
PasswordCipher.decrypt(char[])


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.