Java tutorial
//package com.java2s; import java.security.MessageDigest; public class Main { public static byte[] md5Digest(byte[] password) throws Exception { try { MessageDigest alg = MessageDigest.getInstance("MD5"); alg.update(password); byte[] digest = alg.digest(); return digest; } catch (Exception e) { throw new Exception(e); } } }