I am stuck with casting issue for converting a byte String to byte array.
i.e I have a String "[B@1a758cb". That is Base64 encrypted String of the main String "gunjan". Here for decryption I want to convert that encrypted byte string to byte[].
But String.getByte[] is not working for me. String.getBytes[] gives bytes of the byte String.
How can I do that ?? Do I have to iterate over each character in the byte string and to convert them to byte[] ??
EDITED
I am using Apache Coded 3.1 jar for Base64 conversion. Here is the code from which I am getting this encrypted text..
String in = "gunjan";
byte[] byteStr = in.getBytes();
byte[] base64Encoded = Base64.encodeBase64(byteStr);
Here the value of base64Encoded is [B@1a758cb You can also see the console log in the image..