Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Store Password Field in Encryption Form Using MySQL and Hibernate

 
Nirmal Jatania
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All..

I am using Spring, Hibernate for developing my application..

And as DB side, I have mysql..

Now, My requirement is like, I have User table and that has password field with varchar type.

Now, When new user is created, i just wanna store password field in the Encrypted form...

Is there any facility provided by Hibernate to do so ? Or is there any other way to do so..

Thanks in advance..
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual way to store passwords would be to hash them (using an algorithm like SHA-256), not to store them in encrypted form. That way no one can retrieve them.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!