Creating a Keyed Digest Using MD5
import java.security.MessageDigest; public class Main { public static void main(String[] a) throws Exception { byte[] buffer = new byte[10000]; byte[] key = new byte[8]; MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.update(buffer); byte[] k = md5.digest(key); } }