Here you can find the source of md5Base64(String str)
public static String md5Base64(String str)
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import sun.misc.BASE64Encoder; public class Main { public static String md5Base64(String str) { try {// www. ja v a 2 s.c o m MessageDigest md5 = MessageDigest.getInstance("MD5"); return base64Encode(md5.digest(str.getBytes())); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return null; } public static String base64Encode(byte[] b) { if (b == null) { return null; } return new BASE64Encoder().encode(b); } }