Here you can find the source of computeSHAHash(String password)
public final static String computeSHAHash(String password) throws Exception
//package com.java2s; import java.security.MessageDigest; import android.util.Base64; public class Main { public final static String computeSHAHash(String password) throws Exception { MessageDigest mdSha1 = null; String SHAHash;// w ww .j a v a 2 s . c o m mdSha1 = MessageDigest.getInstance("SHA-1"); mdSha1.update(password.getBytes("ASCII")); byte[] data = mdSha1.digest(); SHAHash = convertToHex(data); return SHAHash; } private static String convertToHex(byte[] data) throws java.io.IOException { StringBuffer sb = new StringBuffer(); String hex = null; hex = Base64 .encodeToString(data, 0, data.length, Base64.NO_PADDING); sb.append(hex); return sb.toString(); } }