Here you can find the source of MD5ToInt(String s)
public static int MD5ToInt(String s)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static int MD5ToInt(String s) { byte[] digest = MD5(s); BigInteger bigInt = new BigInteger(1, digest); return bigInt.intValue(); }//from w ww . j av a 2 s . co m private static byte[] MD5(String s) { MessageDigest m = null; try { m = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } m.reset(); m.update(s.getBytes()); return m.digest(); } }