package com.huowolf.Util;
import java.security.MessageDigest;
import sun.misc.BASE64Encoder;
public class MD5Util {
public static String encode(String message) {
try {
MessageDigest md = MessageDigest.getInstance("md5");
byte[] b = md.digest(message.getBytes());
return new BASE64Encoder().encode(b);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
MD5工具类
最新推荐文章于 2018-04-15 15:50:39 发布