Here you can find the source of sha1Digest(String src)
public static byte[] sha1Digest(String src)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; public class Main { public static byte[] sha1Digest(String src) { try {//from ww w . jav a 2s . c om MessageDigest md = MessageDigest.getInstance("SHA-1"); return md.digest(src.getBytes("UTF8")); } catch (Exception e) { return null; } } }