Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authenticate Hashed password from My Java Swing Application

 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 155
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is wrong with the password() function?

I think this discussion is more suited to a databases forum, so I shall move it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic