This commit is contained in:
2024-02-20 16:08:28 +08:00
parent 055a55cda1
commit e6bfafa686
2 changed files with 5 additions and 4 deletions

View File

@@ -504,7 +504,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
if (hex.length() == 1) {
hex = '0' + hex;
}
return "0x" + hex.toUpperCase();
return Constants.HEX_PREFIX + hex.toUpperCase();
}
/**
@@ -548,9 +548,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
* @return byte
*/
public static byte uniteBytes(byte src0, byte src1) {
byte _b0 = Byte.decode("0x" + new String(new byte[]{src0}));
byte _b0 = Byte.decode(Constants.HEX_PREFIX + new String(new byte[]{src0}));
_b0 = (byte) (_b0 << 4);
byte _b1 = Byte.decode("0x" + new String(new byte[]{src1}));
byte _b1 = Byte.decode(Constants.HEX_PREFIX + new String(new byte[]{src1}));
byte ret = (byte) (_b0 ^ _b1);
return ret;
}