Forums Register Login

DB Encryption/Decryption Techqnique

+Pie Number of slices to send: Send
Hi Friends

Can any body please provide me the sample code for Database Encryption and Decryption?

It would be great help if some helps me out
+Pie Number of slices to send: Send
What, exactly, should this code do? Are you looking for Java code that runs before inserting something in the DB/after getting something out of the DB, or something that runs in the DB?
+Pie Number of slices to send: Send
Hi Ulf
Thanks for replying.

My Requirement is DB Encryption/Decryption........

I have to write java program which will fetch the data from Database and put in the xml file.same data should be encrypted .same thing will apply for Decryption also.

I think you got clear idea. Please let me know if you have any solutions for this..

Thanks in Advance
+Pie Number of slices to send: Send
So the data is unencrypted in the DB, but should be encrypted in the XML file? And when it is transferred from the XML file to the DB, it should get decrypted? Is that correct?

If so, it sounds as if it has nothing to do with databases, but is merely about how to encrypt/decrypt data.
+Pie Number of slices to send: Send
How far have you gotten on this problem? Have you studied the javax.crypto package JavaDocs? Searched for code examples using google?


The most important point is that XML is a text format and must contain only legal unicode characters, while the initial result of encryption will be a byte[]. Therefore, your encrypted byte[] must be encoded to legal characters - base64 encoding is typically used.

The Apache commons codec toolkit is an open source for base64 encoding classes.

Bill


+Pie Number of slices to send: Send
Hi Brogden

Thanks for your valuable time.

i have implemented javax.crypto,BASE64Decoder and BASE64Encoder.

Now it's working wht i was expecting...........



Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 917 times.
Similar Threads
Implementing encryption and decryption in java
Password Encryption and Decryption
Please send me one example of Encryption/Decryption
javax.crypto.BadPaddingException for AES when encrypting and decrypting multiple times
problem in encryption of ZIP files.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:37:31.