Java tutorial
//package com.java2s; public class Main { public static String getMd5StrFromBytes(byte[] md5bytes) { if (md5bytes == null) { return ""; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < md5bytes.length; i++) { sb.append(String.format("%02x", md5bytes[i])); } return sb.toString(); } }