aspose file tools*
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 Java 8 in Action this week in the Java 8 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: 36575
    
  16
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: 36575
    
  16
What is wrong with the password() function?

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