Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java program to retrieve the encrypted data from database

 
sagar shiraguppi
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to read the encrypted data from the database and display it in the decrypted form, please help
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First we need to know how the data was encrypted. If it wasn't encrypted but hashed instead, like it's usually done with passwords, you can't get the original value back.
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
removed. as mentioned, invalid answer.
 
sagar shiraguppi
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That isn't encryption. It is hashing. See hashing as one-way encryption. You can't get the original input back.
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouter Oet wrote:That isn't encryption. It is hashing. See hashing as one-way encryption. You can't get the original input back.


True, but the principle is somewhat the same.

I've used http://www.jasypt.org/ in some of our projects and that normally i enough. Quite easy to work with also.

Also, we should not forget the Security FAQ here at the Ranch.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ove Lindström wrote:True, but the principle is somewhat the same.

No, it isn't - hashing is a one-way algorithm; it is not possible to get the original data back from a hash. Encryption is a two-way algorithm: you can get the original data back, if you have the key to decrypt it.

Many people are confused about this, and think that hashing is some sort of encryption. Showing an example that does hashing when the question is about encryption only makes the confusion worse.
 
sagar shiraguppi
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still keeping fingurs crossed! :P Thank you guys for your inputs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic