Skip to content

comodal/jhex

Repository files navigation

jhex Build Status Download license codecov

JHex provides static utility methods for encoding to and decoding from hexadecimal encoded data.

String hexString = "4265207375726520746F206472696E6B20796F7572204F76616C74696E65";
byte[] decoded = JHex.decode(hexString);
System.out.println(new String(decoded));
String reEncoded = JHex.encode(decoded);
// reEncoded.equals(hexString) == true ... promise.