Here you can find the source of digestOperation(String algo, byte[]... content)
private static byte[] digestOperation(String algo, byte[]... content)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { private static byte[] digestOperation(String algo, byte[]... content) { try {/*from ww w . j a va2 s .c o m*/ MessageDigest messagedigest = MessageDigest.getInstance(algo); for (byte[] data : content) { messagedigest.update(data); } return messagedigest.digest(); } catch (NoSuchAlgorithmException nosuchalgorithmexception) { nosuchalgorithmexception.printStackTrace(); return null; } } }