Here you can find the source of sha1Hash(byte[] data)
public static byte[] sha1Hash(byte[] data) throws Exception
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; public class Main { public static byte[] sha1Hash(byte[] data) throws Exception { MessageDigest md = MessageDigest.getInstance("SHA1"); return md.digest(data); }/*w w w. j a v a2 s . c o m*/ }