Encrypt a password using username as key
843810Aug 29 2002 — edited Dec 21 2002Hi all!
Thank you very much for read this post. I have a really serious problem.
In the company I work, we have a Coldfusion application working, and somebody ask me to create the same application, but using JSP. I�ve worked a lot and the entire application is now in JSP... but... in the database, there is a table that contains the user�s information, like username, address, phone number... bla bla bla... and the encrypted password!!!
I�ve read the ColdFusion code, and i�ve discover that coldfusion encrypts the password using the username as the KEY. the coldfusion code is here:
<cfset encryptedPassword=encrypt(#password#, #username#)>
so, here we are encrypting the password using the username as the key. to decrypt, Coldfusion do this:
<cfset decryptedPassword=decrypt(#encryptedPassword#, #username#)>
The encryption method is BASE64, or UTF-8, i don�t know...
Somebody knows anyway to make the same encryption/decryption process using JAVA??? And the code??? Can you send me that code? Please???
The big problem is: the coldfusion application is used by more than 2,500 users. So, i have to keep the entire login process, and i cannot change any value in the USERS table (DB is Oracle). The users table contains the username and the encrypted password... i have all i need, except the encryption/decryption code in JAVA... the application is not complete yet, and my boss is a really bad guy...
please, help me!!!
Thanks,
Rapeteiro...