Here you can find the source of computeSHAHash(String password)
public static String computeSHAHash(String password)
//package com.java2s; import java.math.BigInteger; import java.security.MessageDigest; public class Main { public static String computeSHAHash(String password) { MessageDigest digest = null; try {//from w w w. j av a2 s . com digest = MessageDigest.getInstance("SHA-1"); } catch (Exception e) { e.printStackTrace(); } digest.reset(); byte[] data = digest.digest(password.getBytes()); return String.format("%0" + (data.length * 2) + "X", new BigInteger(1, data)); } }