Converting java base64 to oracle raw value
Posted on 2004-09-07
We have a encrypted byte array which has been encrypted using des3, we have converted this to base 64 string
We now want to decrypt this string in oracle.
To do this we use the oracle 9i functions
we convert base64 string to a raw value, then we decode the raw value and then we decrypt the raw value in oracle 9i using des3.
We are not getting the same value? Any ideas what we are doing wrong?
The main thing is we are having problems trying to convert data between oracle and java.
In oracle the encrypted value is stored as a raw value in a oracle database.
We want to be able to encrypt the data in java in a way that the data can be stored in this raw field.
To do this we encrypt the data in java using des3, this returns a byte array, we convert this to a base64 encoded string so we can write this to a file.
We then read this value in oracle.