Hi Senthil-

This is not a Struts question and doesn't really belong on this list,
but I'll try to answer it anyway. You are storing the passwords as a
hash, which by definition is one-way and non-reversible back into the
cleartext. Hashes are mainly used when you want to compare previously
entered data to new data to see if they are the same, like an e-mail
message. You'll want to use either a symmetric or asymmetric cipher
and you'll need to store the encryption key somewhere. Take a look at
the javax.crypto package, and here's a few articles about how to solve
your problem:

http://java.sun.com/developer/JDCTechTips/2004/tt0116.html
http://www.onjava.com/pub/a/onjava/excerpt/java_security_ch1/index.html?page=1
http://www.onlamp.com/pub/a/bsd/2002/10/31/FreeBSD_Basics.html

-ed

On 6/7/05, senthil Kumar <[EMAIL PROTECTED]> wrote:
> Hello all.,
> 
> 
> 
> In my database password already stored in encrypted format.
> 
> Once user forget the password i need to send back him but its seeing by 
> encryption format only.
> 
> Bofere send password to user, i need to decrypt in java.
> 
> I am encrypt using following code
> 
> 
> cryptoInterface=CryptoFactory.getCryptoHandler();
> password = cryptoInterface.getHash(password);
> 
> 
> But i cant decrypt back. Any one can send the code or help me.
> 
> Thanks in advance.
> Senthil S
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to