Here you can find the source of sha(String strPlain)
public static byte[] sha(String strPlain)
//package com.java2s; import java.security.MessageDigest; public class Main { public static byte[] sha(String strPlain) { byte s[] = null; try {//from w ww. ja v a 2 s .co m MessageDigest m = MessageDigest.getInstance("SHA-1"); s = m.digest(strPlain.getBytes("utf-8")); } catch (Exception e) { throw new RuntimeException(e); } return s; } }