Hello guy's,
I've got a problems of conversion that Im pretty sure it is a problems of encoding but I wonder if somebody can help me with that !
Well .. the situation is that Iv'e got an crypted data that I dont know what kind of encoding its used to create my ByteArrayOutputStream.
So I've got an ByteArrayOutputStream that I want to put as
string and store it in the database, after I want to get the object back from the database, and decrypt the data for the user.
Its encoded with an X509Certificate.
When I want to decrypt my data I have a problems of padding because the bytes when converting -127,-99,-112,-113 and -115 to String they are flipped to byte 63 and the encryption algorythm is scrapped.
So ... Im able to reproduce the problem with a simple example :
result :
-127 -> 63
-99 -> 63
-112 -> 63
-113 -> 63
-115 -> 63
As I said, im pretty sure that its an encoding thing but I can't be able to found how to make the bytes equals.
If anybody can help me, it will be nice because im stock here !
Thanks,
Chris.