Java tutorial
//package com.java2s; public class Main { private static String buildMd5String(byte[] md5Bytes) { StringBuilder md5String = new StringBuilder(); for (byte b : md5Bytes) { int num = b >= 0 ? b : b + 256; if (num < 16) { md5String.append("0"); } md5String.append(Integer.toHexString(num)); } return md5String.toString(); } }