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 JDBC and the fly likes Authenticate Hashed password from My Java Swing Application 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 » Databases » JDBC
Bookmark "Authenticate Hashed password from My Java Swing Application" Watch "Authenticate Hashed password from My Java Swing Application" New topic
Author

Authenticate Hashed password from My Java Swing Application

Stanley Mungai
Ranch Hand

Joined: Dec 09, 2011
Posts: 155

HI Guys I have Built a Java Swing Application that Connects to a Database, I have Been Using Mysql But I have Changed to Oracle 11g and Now I am facing Problems authanticating user Log in from the Aplication. I have Hashed the Password using this Procedure:




I Insert into the Database from the Java Application Using the Query:




My Problem is that when the user Logs in Using the Correct Credentials the login fails. Initially While I was Using MYSQL I Used:



Am looking for the best way to authenticate user login from My swing App.

Give a beggar a fish; feed him for a day. Teach him how to fish; Feed him for a lifetime.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
Stanley Mungai wrote:HI Guys I have Built a Java Swing Application that Connects to a Database, I have Been Using Mysql But I have Changed to Oracle 11g and Now I am facing Problems authanticating user Log in from the Aplication. I have Hashed the Password using this Procedure:




I Insert into the Database from the Java Application Using the Query:




My Problem is that when the user Logs in Using the Correct Credentials the login fails. Initially While I was Using MYSQL I Used:



Am looking for the best way to authenticate user login from My swing App.
Why are you doing the hashing in your application rather than letting the databases do it?
Stanley Mungai
Ranch Hand

Joined: Dec 09, 2011
Posts: 155

NO Ritchie, The hashing is Happening from the database. When Creating a New User from Swing Application, the query:


is executed that Calls the Procedure above to Hash the password so that the database users are not able to view it.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
What is wrong with the password() function?

I think this discussion is more suited to a databases forum, so I shall move it.
 
 
subject: Authenticate Hashed password from My Java Swing Application
 
Similar Threads
struts very important question to me?
Security problem
Authentication with LDAP using Java(URGENT)
Navigation problem
Problem in implementing Single Sign on