Android examples for java.security:MD5
Make MD5 byte array from String
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main{ public static byte[] makeMD5(String param) { byte[] digest = null; try {//from w w w. j a v a 2 s. c o m digest = MessageDigest.getInstance("MD5").digest( param.getBytes()); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return digest; } }