I would like to have your suggestions on this. I have a database table with 3 million Credit Card numbers. The requirement is to encrypt all the 3 million cards. So I have to retrive card number encrypt it and update it on the table. Can anybody suggest the safest and most efficient way of doing this? Should I use EJBs or simple JDBC calls would be good enough. I am using oracle database.
I'd just do it in Oracle. Oracle supports Java, and Java has packages for encryption. You could just write a procedure to go through the table encrypting easch row. No need to pull data out of Oracle and add the overhead of a network connection.
Look at using the Oracle functions HexToRaw() and RawToHex() with a stored procedure and CTAS (CREATE TABLE ... AS). You won't event have to suck the data out.
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems: