大神支招呀,小弟在此谢过了
public static String MD5(String paramString){
try
{
if (isBlank(paramString))
return null;
MessageDigest localMessageDigest = MessageDigest.getInstance("MD5");
localMessageDigest.update(paramString.getBytes("UTF-8"));
byte[] arrayOfByte = localMessageDigest.digest();
StringBuilder localStringBuilder = new StringBuilder();
for (int i = 0; ; i++)
{
if (i >= 16)
return localStringBuilder.toString();
Object[] arrayOfObject = new Object[1];
arrayOfObject[0] = Byte.valueOf(arrayOfByte[i]);
localStringBuilder.append(String.format("%02x", arrayOfObject));
}
}
catch (Exception localException)
{
}
return null;
}
这一段是md5的加密,求算法