Here you can find the source of SHA1(String strs)
public static String SHA1(String strs)
//package com.java2s; //License from project: Apache License import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String SHA1(String strs) { byte[] _bytes = null; try {/* w ww . ja v a 2 s.co m*/ MessageDigest md = MessageDigest.getInstance("SHA"); md.update(strs.getBytes()); _bytes = md.digest(); } catch (NoSuchAlgorithmException ex) { } return new BigInteger(1, _bytes).toString(16); } }