Java tutorial
//package com.java2s; import java.security.MessageDigest; public class Main { public static byte[] md5Byte(String encryptStr) throws Exception { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(encryptStr.getBytes("UTF-8")); return md.digest(); } }