Here you can find the source of MD5StringToL32(String md5Str)
public static String MD5StringToL32(String md5Str)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String MD5StringToL32(String md5Str) { String string = null;/*w ww .j a v a 2 s. com*/ try { MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] bytes = md5.digest(md5Str.getBytes()); StringBuffer stringBuffer = new StringBuffer(); for (byte b : bytes) { int bt = b & 0xff; if (bt < 16) { stringBuffer.append(0); } stringBuffer.append(Integer.toHexString(bt)); } string = stringBuffer.toString(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return string; } }