File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "Password Encoding/decoding" Watch "Password Encoding/decoding" New topic

Password Encoding/decoding

san patil

Joined: Mar 30, 2003
Posts: 8
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?
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
I agree. Here's the link:
subject: Password Encoding/decoding
jQuery in Action, 3rd edition