11
Problem:
I’m getting byte
and when I try to turn into String
is making a mistake.
...
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 the msgBytes.toString()
, I believe that conversion is not done in this way. Someone knows why you return to me [@549498794
.
What’s in
ch
?– Leonel Sanches da Silva
ch
is my object,ChaveAES ch = new ChaveAES()
,ChaveAES
it’s my class that makesEncode
andDecode
and other tasks.– noNihongo