I have a byte array initialized as follows:
public static byte[] tmpIV = {0x43, (byte)0x6d, 0x22, (byte)0x9a, 0x22,
(byte)0xf8, (byte)0xcf, (byte)0xfe, 0x15, 0x21,
(byte)0x0b, 0x38, 0x01, (byte)0xa7, (byte)0xfc, 0x0e};
If I print it, he gives me
67 109 34 -102 34 -8 -49 -2 21 33
11 56 1 -89 -4 14
Then I converted the entire array of bytes to a string and sent to my friend.
String str = new String(tmpIV);
My friend is a C # programmer
So my friend gets some other data. How my friend will receive the same data as me. Also in Java, if I convert this string to an array of bytes, I do not get what I sent:
67 109 34 -17 -65 -67 34 -17 -65 -67
-17 -65 -67 -17 -65 -67 21 33 11 56 1
-17 -65 -67 -17 -65 -67
source
share