Here you can find the source of digest(byte[] input, String algoritmo)
public static byte[] digest(byte[] input, String algoritmo) throws NoSuchAlgorithmException
//package com.java2s; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static byte[] digest(byte[] input, String algoritmo) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance(algoritmo); md.reset();/*ww w . ja v a 2 s . c om*/ return md.digest(input); } }