How about this:

    public String password() {
        TEAV enc = new TEAV();
        String encryptedValue = super.password();
        String returnValue = null;
        if (encryptedValue != null) {
            try {
                String unencryptedValue = enc.decode(encryptedValue);
                returnValue = unencryptedValue.trim();
            } catch (Exception e) {
                logger.error("Password encryption failed ", e);
            }
        }
        return returnValue;
    }

    public void setPassword(String value) {
        if (value != null) {
            TEAV enc = new TEAV();
            String encryptedValue = enc.encode(value);
            super.setPassword(encryptedValue);
        }
    }


--- Chuck Hill <[EMAIL PROTECTED]> wrote:

> Hi Brooke,
> 
> On Oct 6, 2006, at 2:33 PM, Brooke Gravitt wrote:
> >
> >    I'm working on a simple direct-to-web app that uses a mysql  
> > backend. I have a very simple schema; it's a table with 4 cols: id,  
> > password, username, hostname. We will be using this to replace the  
> > excel spreadsheets we use to store shared passwords.
> >
> > I can add, drop, view, etc. no problems. What I'd like to do is  
> > encrypt ( two-way ) the password prior to storing it, and decrypt  
> > it when retrieving it. I'd like to use JSSE or something similar.
> >
> > Is anyone doing something like this? A one-way encryption won't  
> > help me. The whole point is to keep someone from being able to see  
> > the passwords in plain text in the DB. I'm  new to WO so any help  
> > would be greatly appreciated.
> 
> Doing this is not greatly difficult.  I would handle this in the  
> EnterpriseObject rather than looking at the D2W side.
> 
> 
> > Oh, and I'd like to use a custom security provider for accessing  
> > the WOA. Is this possible?
> >
> 
> I am not clear on what it is you want here.  Care to elaborate?
> 
> Chuck
> 
> -- 
> 
> Practical WebObjects - for developers who want to increase their  
> overall knowledge of WebObjects or who are trying to solve specific  
> problems.    http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/jep9816%40yahoo.com
> 
> This email sent to [EMAIL PROTECTED]
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Attachment: TEAV.java
Description: 3484708408-TEAV.java

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to