Here you can find the source of getHash(String password, byte[] salt)
public static byte[] getHash(String password, byte[] 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 byte[] getHash(String password, byte[] salt) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest digest = MessageDigest.getInstance("SHA-256"); digest.reset();/* w w w. ja va 2 s . c om*/ digest.update(salt); byte[] input = digest.digest(password.getBytes("UTF-8")); for (int i = 0; i < 13; i++) { digest.reset(); input = digest.digest(input); } return input; } }