package com.chat.util; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5Util { public static String hex(byte[] array) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < array.length; ++i) { sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring( 1, 3)); } return sb.toString(); } public static String md5Hex(String message) { try { MessageDigest md = MessageDigest.getInstance("MD5"); return hex(md.digest(message.getBytes("CP1252"))); } catch (NoSuchAlgorithmException e) { } catch (UnsupportedEncodingException e) { } return null; } }
最近下载更多
Liting123 LV1
2月6日
李先婷 bkxo LV2
1月29日
陈淦用 LV1
2023年12月4日
lalalla159 LV3
2023年12月2日
mumumumu11
2023年11月28日
暂无贡献等级
yybb7435100 LV2
2023年8月7日
ALIT科技 LV4
2023年4月24日
liu2022 LV14
2022年7月31日
jolehod LV2
2022年5月16日
225225225 LV1
2022年5月8日
最近浏览更多
Rinkia
3月13日
暂无贡献等级
阿凡达 LV9
2月29日
Liting123 LV1
2月6日
李先婷 bkxo LV2
1月29日
11231123exo
2023年12月16日
暂无贡献等级
微信网友_6762641760833536
2023年12月4日
暂无贡献等级
陈淦用 LV1
2023年12月4日
1234567p LV1
2023年12月4日
lalalla159 LV3
2023年12月2日
mumumumu11
2023年11月28日
暂无贡献等级