public static String md5Encrypter(String sourceStr) throws NoSuchAlgorithmException, UnsupportedEncodingException{String resultMd5 ="";MessageDigest md = MessageDigest.getInstance("MD5");md.update(sourceStr.getBytes());byte b[] = md.digest();int i;StringBuffer
buf = new StringBuffer("");for (int offset = 0; offset < b.length; offset++) { i = b[offset]; if (i < 0) i += 256; if (i < 16) buf.append("0"); buf.append(Integer.toHexString(i)); }resultMd5 = buf.toString();return resultMd5;}
Md5加密
最新推荐文章于 2022-12-28 13:50:25 发布
349

被折叠的 条评论
为什么被折叠?



