Merge remote-tracking branch 'gitee/v6-dev' into v6-dev

This commit is contained in:
VampireAchao
2024-02-26 22:26:16 +08:00
3 changed files with 37 additions and 5 deletions

View File

@@ -85,6 +85,13 @@ public class HexUtilTest {
Assertions.assertEquals("e8 c6 70 38 0c b2 20 09 52 68 f4 02 21 fc 74 8f a6 ac 39 d6 e9 30 e6 3c 30 da 68 ba d9 7f 88 5d", formatHex);
}
@Test
public void formatHexTest2(){
final String hex = "e8c670380cb220095268f40221fc748fa6";
final String formatHex = HexUtil.format(hex, "0x");
Assertions.assertEquals("0xe8 0xc6 0x70 0x38 0x0c 0xb2 0x20 0x09 0x52 0x68 0xf4 0x02 0x21 0xfc 0x74 0x8f 0xa6", formatHex);
}
@Test
public void decodeHexTest(){
final String s = HexUtil.encodeStr("6");