-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: encrypt password field in db
PostPosted: Tue Apr 17, 2007 3:52 pm 
Newbie

Joined: Tue Apr 17, 2007 3:01 pm
Posts: 1
hi everyone,

i was looking to find a way to encrypt my password in the db using hibernate. i didnĀ“t want to use a sql query like the following to accomplish this:

INSERT INTO user VALUES(0, "myname", PASSWORD('mypassword'));

is there any other way to achieve this??

thanks in advance

david


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 17, 2007 8:42 pm 
Newbie

Joined: Fri Jun 02, 2006 9:31 pm
Posts: 7
Check out the Jasypt project. It has nice Hibernate integration:

http://www.jasypt.org/hibernate3.html

_________________
"Man's Ego is the fountainhead of Human progress..."
(Ayn Rand)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 18, 2007 1:26 am 
Newbie

Joined: Tue Apr 17, 2007 9:02 am
Posts: 7
Have you tried using these:
java.security.MessageDigest
sun.misc.BASE64Encoder

Using these, you could encode your password before saving to the database.

_________________
Excellence Inc


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.