Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

encrypt- decrypt problem

 
Vikas Kumar Sahu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All,
I want to encrypt my password text and want to save into database and I want to fetch that password from database and decrypt and want to mach.
Give some link or docs link for overcom my this problem , I m very new for that.
Thanks
Vikas
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Security forum.
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really want to decrypt and compare or only compare? If it is the latter, you should use a hash function and not use uncryption. Many databases have both hash and encrypt/decrypt functions built in. If you want to do it in Java (It's not that hard, but I don't recommend it if you don't have some previous experience in cryptopraphy) then look at the JCE.
I would recommend the book Translucent Databases. It's way more information than you need, but it has some code samples for doing hashing and encryption/decryption both in the database and in SQL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic