Java tutorial
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static byte[] md5(byte[] bytes) { try { MessageDigest messageDigest = MessageDigest.getInstance("MD5"); messageDigest.update(bytes); return messageDigest.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return null; } }