I am tring to convert a set of strings to a byte[] array. At first, I do something like this to convert a byte array to a string:
public String convertByte(byte[
hexToInt should be like this
private static int hexToInt(char c1, char c2) { return (Character.digit(c1, 16) << 4) + Character.digit(c2, 16); }
Otherwise CA returns AA in byte.