Here you can find the source of sha256(byte[] bytes)
private static byte[] sha256(byte[] bytes) throws NoSuchAlgorithmException
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { private static byte[] sha256(byte[] bytes) throws NoSuchAlgorithmException { return MessageDigest.getInstance("SHA-256").digest(bytes); }/* www .j av a2s . c o m*/ }