What I'm trying to do is for example, lets say we had a string that looked like this:
String xyz = "1234567890";
How can I convert that String object into an Byte Array so the result byte array looks like:
[12, 34, 56, 78, 90];
I've tried various ways, from the very rudimentary xyz.getBytes() along with different encodings, which all just give some random values, albeit prob correct, just not what I'm looking for. Tried splitting up the string into an array, something like ["12", 34" ....] and trying to convert that into a byte array with no luck.
Am I not understanding here how strings are getting converted or is there some way of accomplishing this? Any tips appreciated. Thanks!