-
Notifications
You must be signed in to change notification settings - Fork 5
03. HexUtil
晓寻遥 edited this page Nov 6, 2021
·
1 revision
HexUtil
is a tool class that converts a string or byte array to a hexadecimal representation.
Can be used for 「image character string representation」, 「encryption and decryption」and 「encoding conversion」.
public void encodeHexStr_and_decodeHexStr(){
String a = "this is a xiaoTools";
// 746869732069732061207869616f546f6f6c73
System.out.println(HexUtil.encodeHexStr(a));
// this is a xiaoTools
System.out.println(HexUtil.decodeHexStr(HexUtil.encodeHexStr(a)));
}
to learn more, refer to the API documentation