public static byte[] fromHex(String hex) {
    checkArgument(hex.length() % 2 == 0, "length must be a multiple of 2");
    int len = hex.length();
    byte[] b = new byte[len / 2];
    for (int i = 0; i < len; i += 2) {
      b[i / 2] = hexCharsToByte(hex.charAt(i), hex.charAt(i + 1));
    }
    return b;
  }
Create a byte array from a string of hash digits. The length of the string must be a multiple
of 2
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java