@@ -0,0 +1,1149 @@
+package yushijinhun.authlibagent.util;%0A%0Apublic final class HexUtils %7B%0A%0A%09private static final char%5B%5D HEX = %220123456789abcdef%22.toCharArray();%0A%0A%09public static String bytesToHex(byte%5B%5D bytes) %7B%0A%09%09char%5B%5D str = new char%5Bbytes.length * 2%5D;%0A%09%09int pos;%0A%09%09for (int i = 0; i %3C bytes.length; i++) %7B%0A%09%09%09pos = i * 2;%0A%09%09%09str%5Bpos%5D = HEX%5B(bytes%5Bi%5D & 0xf0) %3E%3E%3E 4%5D;%0A%09%09%09str%5Bpos + 1%5D = HEX%5Bbytes%5Bi%5D & 0xf%5D;%0A%09%09%7D%0A%09%09return new String(str);%0A%09%7D%0A%0A%09public static byte%5B%5D hexToBytes(String hex) %7B%0A%09%09char%5B%5D chars = hex.toLowerCase().toCharArray();%0A%09%09byte%5B%5D bytes = new byte%5Bchars.length / 2%5D;%0A%09%09for (int i = 0; i %3C bytes.length; i++) %7B%0A%09%09%09int pos = i * 2;%0A%09%09%09bytes%5Bi%5D = (byte) ((hexCharToByte(chars%5Bpos%5D) %3C%3C 4) %7C hexCharToByte(chars%5Bpos + 1%5D));%0A%09%09%7D%0A%09%09return bytes;%0A%09%7D%0A%0A%09private static byte hexCharToByte(char hexChar) %7B%0A%09%09if (hexChar %3E= '0' && hexChar %3C= '9') %7B%0A%09%09%09return (byte) (hexChar - '0');%0A%09%09%7D else if (hexChar %3E= 'a' && hexChar %3C= 'z') %7B%0A%09%09%09return (byte) ((hexChar - 'a') + 10);%0A%09%09%7D else if (hexChar %3E= 'A' && hexChar %3C= 'Z') %7B%0A%09%09%09return (byte) ((hexChar - 'A') + 10);%0A%09%09%7D%0A%09%09throw new IllegalArgumentException(%22not a hex char: %22 + hexChar);%0A%09%7D%0A%0A%09private HexUtils() %7B%0A%09%7D%0A%0A%7D%0A

add hex utils hehe