Here you can find the source of sha256(String password, String salt)
public static String sha256(String password, String salt) throws NoSuchAlgorithmException, UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String sha256(String password, String salt) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest digest = MessageDigest.getInstance("SHA-256"); digest.reset();/*from www .j ava2s . com*/ digest.update(salt.getBytes()); byte[] mdbytes = digest.digest(password.getBytes("UTF-8")); StringBuffer hexString = new StringBuffer(); for (int i = 0; i < mdbytes.length; i++) { hexString.append(Integer.toHexString(0xFF & mdbytes[i])); } return hexString.toString(); } }