This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Password Encoding/decoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Password Encoding/decoding" Watch "Password Encoding/decoding" New topic
Author

Password Encoding/decoding

san patil
Greenhorn

Joined: Mar 30, 2003
Posts: 8
Hi,
I am looking for solution to encode and decode the password. I have developed a web application where I have stored User names and passwords in a dat file. I want to protect passwords from administrator.
Any solutions?
Thanks,
San
damien malone
Ranch Hand

Joined: May 06, 2003
Posts: 35
If you dont want administrators to see the password then the easiest way os to simply not store it. Instead, store a hash (maybe MD5, it has fairly good performance) of the password. When the user trys to log in, just run the hashing algorithm against the password they supplied and if they match, let them in. If you use a good algorithm like MD5 you are virtually guaranteed that the password is correct, and no administrator would be able to recreate the password even if they had access to the encoded password.
Hope this helps
Damien
 
 
subject: Password Encoding/decoding
 
Similar Threads
Double Hashing - hashing SHA1 with MD5
Curious Question relating username and password...
Encryption in XML
Encrypted Password for Oracle JDBC
how long is your password?