Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

One way hash function in java

madushanSep 24 2010 — edited Oct 10 2010
Simply i want to save a password entered to a java program and save it in a MySQL database
Here I want to encrypt that password and save it in the database.... I prefer one way hash function encryption because it fulfills my need.
SHA-1 is the best in java now as I read from a article, is it?

What I need is that if someone can post a complete code which uses SHA-1 (if it is the best preferred one).
I've tried some codes published in the web but didn't work
one code worked very well but when I entered characters like "@#$%%" it failed.

Thank You!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2010
Added on Sep 24 2010
8 comments
895 views