private static String toHexString(byte bytes[]) {
        StringBuilder hs = new StringBuilder();
        String stmp = "";
        for (int n = 0; n < bytes.length; n++) {
            stmp = Integer.toHexString(bytes[n] & 0xff);
            if (stmp.length() == 1){
                hs.append("0").append(stmp);
            }else{
                hs.append(stmp);
            }
        }
        return hs.toString();
    }
Date: 2018/8/23
Company: www.dtstack.com
@author xuchao
core/src/main/java/com/dtstack/flink/sql/util/MD5Utils.java