Problem:
I am getting byte
and when I try to transform to String
it is giving error.
...
byte[] msgBytes = ch.decode(hex, ch.key()); // retorna byte
String msgDecode = msgBytes.toString(); // tentando converter byte em String
System.out.println("Mensagem descriptografada [" + msgDecode + "]"); // Exibir
...
Since decode
returns me a few bytes, I used msgBytes.toString()
, I believe that conversion is not done this way. Does anyone know why%% returns me.