I am developing an app for Android. In this app, you must use the algorithm for encryption / decryption Rijndael.
To use this algorithm, I need to mount the IVs. In the case is an array of bytes. So far so good.
The problem is that I have to use the same IVs from a Web Service written in C #.
C # is thus:
byte[] bytIV = { 121, 241, 10, 1, 132, 74, 11, 39, 255, 91, 45, 78, 14, 211, 22, 62 };
When I try to do the same in Java, an error occurs and I suggested adding a cast a few numbers. What makes the code this way:
byte[] bytIV = { 121, (byte) 241, 10, 1, (byte) 132, 74, 11, 39, (byte) 255, 91, 45, 78, 14, (byte) 211, 22, 62 };
Still did not work.
Does anyone have a suggestion of what I do?
Thanks!
In the example that I spent here, I used (cast) instead of (byte). Example corrected. Note: There was (cast) in my code. In the code was (byte).