当前位置 : 首页 » 文章分类 :  开发  »  Apache-Commons-Codec 笔记

Apache-Commons-Codec 笔记

Apache-Commons-Codec 笔记
http://commons.apache.org/proper/commons-codec/

DigestUtils

md5Hex() MD5

public static String md5Hex(final byte[] data)
public static String md5Hex(final String data)
public static String md5Hex(final InputStream data) throws IOException

Hex 十六进制

Java十六进制字符串转byte数组

@Test
public void hexoToByteArray() throws Exception {
    byte[] bytes = Hex.decodeHex("4E6AE63D".toCharArray());
    System.out.println("base64:");
    System.out.println(Base64Utils.encodeToString(bytes));
}

Convert a string representation of a hex dump to a byte array using Java?
https://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java

上一篇 JaCoCo

下一篇 Expect脚本

阅读
评论
113
阅读预计1分钟
创建日期 2020-10-09
修改日期 2020-10-09
类别

页面信息

location:
protocol:
host:
hostname:
origin:
pathname:
href:
document:
referrer:
navigator:
platform:
userAgent:

评论