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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Encryption in Oracle , decryption in Java

Re: Encryption in Oracle , decryption in Java

From: Valentin Minzatu <valentinminzatu_at_yahoo.com>
Date: 10 May 2007 13:38:52 -0700
Message-ID: <1178829532.240180.279650@y80g2000hsf.googlegroups.com>


On May 10, 10:13 am, schw <schwa..._at_alpha.net.pl> wrote:
> Hi
>
> I encountered a problem not sure how to solve it. please help if
> possible.
>
> in oracle9 I do a simple encryption (using DES) that gives me the
> following RAW:
>
> F26D94ECDACDBD111584C7A8A9018A5C
>
> when decrypted I get 36463643363133313332333333343335 which is
> correct.
>
> However in java when I try decrypting the
> 'F26D94ECDACDBD111584C7A8A9018A5C' I get this:
>
> 3646364336313331c15fa7dfe9f98e24
>
> First 8 bytes are exactly the same, the other 8 bytes differ, why ?
>
> In Java I use the following code:
>
> Cipher dcipher = null;
>
> dcipher = Cipher.getInstance("DES/ECB/NoPadding");
>
> SecretKey myKey = new SecretKeySpec(_key, "DES");
>
> dcipher.init(_cryptMode, myKey);
>
> return dcipher.doFinal(_buffer);
>
> Obviously keys in both encryption and decryption are the same.
>
> Thanks for any hints.

Why would you decypher that data in a different place than the one you encrypted it in? Isn't that breaking the concept of a service? Received on Thu May 10 2007 - 15:38:52 CDT

Original text of this message

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