code: static byte[] decodeHex(String hex) {
          requireNonNull(hex);
          return BaseEncoding.base16().decode(hex.toUpperCase());
      }
docs: Decodes a hex-encoded string into a byte array. Accepts both lower- and upper-case [a-f] characters.
  
  @param hex the hexadecimal string to decode.
  @return the input string converted to a binary byte array.
  @throws IllegalArgumentException if the input string contains any non-hex characters, or if the length of
  the input string is not a multiple of 2.