cy_88 发表于 2017-1-4 06:37:15

apache common md5编码

  依赖jar:

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.4</version>
</dependency>
  代码实现:

public static void main(String[] args) throws Exception {
String data="领客网(linkrmb.com)目标:扫遍京东、天猫折扣最低的商品!";
String encodeStr=DigestUtils.md5Hex(data);
System.out.println(encodeStr);
}
  输出:

写道

c363e9cc2aa0cb222820283bf8e6f742
页: [1]
查看完整版本: apache common md5编码