What is the original SecretKey format?
Do you know what byte[]contains signed bytes from -128 to 127? It would hurt if you tried this:
byte[] key = {
0x00,0x01,0x02,0x03,0x05,0x06,0x07,0x08,
0x0A,0x0B,0x0C,0x0D,0x0F,0x10,0x11,0x12
};
Note. If you have values such as 0x80 - 0xFF, you need to specify them as (bytes) 0x80 - (bytes) 0xFF to avoid a range warning.
source
share