Well, yes.
Just do a SELECT
But, to provide a more useful answer, the idea is to do something like this:
Suppose, you have a function encrypt(
String input), which creates an excrypted String for you.
Example: Suppose the encryptedPassword is something like %@SF&HGEB&*)$M#*SND*@)! now, and that it's impossible to decrypt it. We save this String to the database in the 'saveToDatabase' method, and we are done.
Then, when a user tries to log in, use something like this:
Example What we do here is to get the encrypted password from the database. Then, we get the password the user typed in (from a form, or swing, or something else). As we cannot decrypt it, we encrypt it and compare the encrypted input password against the encrypted password in the database. If the two encrypted password are the same, it is the same password, thus providing the user access to the system.
I hope this clears up any question you have, if it doesn't, let me/us know!
Erik Pragt