Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Decrypt oracle data with java

Decrypt oracle data with java

From: Samuel Zarza <samuel_zarza_at_geocities.com>
Date: 16 Apr 2002 08:24:29 -0700
Message-ID: <347d629d.0204160724.56822214@posting.google.com>


Hi:
  I need to decrypt oracle crypted data (with dbms_obfsucation_toolkit) with java code. I've tried with the following code but I had no luck:

// I have the string read from Oracle in myCipheredText variable

SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); DESKeySpec desKeySpec = new DESKeySpec("_MyKey__".getBytes()); SecretKey desKey = keyFactory.generateSecret(desKeySpec);

Cipher desCipher = Cipher.getInstance("DES"); desCipher.init(Cipher.DECRYPT_MODE, desKey);

byte[] textoDescifrado = desCipher.doFinal(myCipheredText.getBytes()); System.out.println(new String(textoDescifrado));

The result isn't the same between oracle and this code.

Thanks.

Regards, Samuel Received on Tue Apr 16 2002 - 10:24:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US