淘先锋技术网

首页 1 2 3 4 5 6 7
try {

    MessageDigest md = MessageDigest.getInstance("MD5");

    result = byte2hex(md.digest(orgin.toString().getBytes("utf-8")));//orign为原始内容;类型是string

} catch (Exception e) {

    throw new java.lang.RuntimeException("sign error !");

}
用于加密字符串~~