Home arrow static arrow Java Programming [Archive] - Java Cryptography Extension (JCE) and data types
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Java Cryptography Extension (JCE) and data types
This topic has 2 replies on 1 page.

Posts:23
Registered: 2/20/04
Java Cryptography Extension (JCE) and data types  
Aug 9, 2004 2:07 PM



 
Hello,

I am trying to encrypt my database. I want to encrypt before I write and decrypte when I do a read from the database. However, if I am going to be writing to columns that are text, number, dates, etc, won't I receive errors when I attempt that?

I am using prepared staments to communicate with the database and using jdk1.3

Thanks!
 

Posts:179
Registered: 7/30/04
Re: Java Cryptography Extension (JCE) and data types  
Aug 9, 2004 2:52 PM (reply 1 of 2)



 
Have you looked up info on the Java Cryptographic API?
Why do you think that you will receive errors?
Have you tried to implement a crypto layer into your existing design?

You could start by explore the Cipher class, and different ways to convert primitives to byte[] arrays and back.
 

Posts:1,906
Registered: 97-08-23
Re: Java Cryptography Extension (JCE) and data types  
Aug 9, 2004 6:50 PM (reply 2 of 2)



 
His point is that ciphertext is random binary data. If you encrypt before storing, what you're saying is that your DB is going to be a bunch of BLOBs. You won't be able to sort, search, implement constraints, or take advantage of stored procedures.

To the OP - I believe a number of DBs implement encryption "inside" themselves. You have to supply the password/key through the driver. Beyond that, I know very little. Try Googling "encrypted database" and see what you get.

Grant
 
This topic has 2 replies on 1 page.