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

猜你喜欢

转载自snv.iteye.com/blog/2157250