Here you can find the source of md5ToString(byte[] md5sum)
public static final String md5ToString(byte[] md5sum)
//package com.java2s; //License from project: Open Source License public class Main { public static final String md5ToString(byte[] md5sum) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < md5sum.length; i++) { sb.append(Integer.toString((md5sum[i] & 0xff) + 0x100, 16).substring(1)); }// w w w.j ava 2s . c o m return sb.toString(); } }