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[] HashSHA256(byte data[]) throws NoSuchAlgorithmException { MessageDigest sha = MessageDigest.getInstance("SHA-256"); return sha.digest(data); } }