Пример #1
0
 public static byte[] hexDecode(String s) {
   try {
     return Hex.decodeHex(s.toCharArray());
   } catch (DecoderException e) {
     throw new ClientProblemException(
         "Hex content is not valid hex: " + e.getMessage() + ": " + s);
   }
 }
Пример #2
0
 private static String hexEncode(byte[] bytes) {
   return new String(Hex.encodeHex(bytes));
 }