List of utility methods to do MD5 String
String | MD5String(String str) MD String MessageDigest md = MessageDigest.getInstance("MD5"); md.update(str.getBytes()); byte[] digest = md.digest(); StringBuffer sb = new StringBuffer(); for (byte b : digest) { sb.append(Integer.toHexString((int) (b & 0xff))); return sb.toString(); ... |
String | MD5StringToL32(String md5Str) MD String To L String string = null; 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) { ... |
int | MD5ToInt(String s) MD To Int byte[] digest = MD5(s); BigInteger bigInt = new BigInteger(1, digest); return bigInt.intValue(); |
String | md5Util(String password) md Util MessageDigest messageDigest = null; try { messageDigest = MessageDigest.getInstance("md5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); messageDigest.update(password.getBytes()); byte[] data = messageDigest.digest(); ... |