Here you can find the source of md5(String src)
public static byte[] md5(String src)
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; public class Main { public static byte[] md5(String src) { try {/*w w w .ja v a 2 s . c om*/ MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] md = md5.digest(src.getBytes()); return md; } catch (Exception e) { } return null; } public static byte[] md5(byte[] src) { try { MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] md = md5.digest(src); return md; } catch (Exception e) { } return null; } }