Decrypting from a 3DES/Base64 database
843811Apr 7 2008 — edited Apr 10 2008Hi all !
I'm quite new to java and I'm writing a simple app to read-only access a remote db (mysql), mirroring in to a local db (I choose H2) and making some queries, reports...
No problem on connecting to db and writing some forms (using Netbeans), but datas on remote db are encrypted using 3DES+Base64 algorithm.
The db administrator gave me both the key and initialization vector used for 3DES encryption :
byte [] key = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 };
byte [] iv = { 8, 7, 6, 5, 4, 3, 2, 1 };
but now I'm trying to write some code to my jdbc connection following some examples found on the web, but no luck...
I guess 3DES/Base64 is a very common method of db storage to secure data, so I'm sure that some of you already used it and could post an explanatory piece of code.
May you help me ?
Many thanks for your kind attention and best regards
Michele