Here you can find the source of SHA1(byte[] src)
public static byte[] SHA1(byte[] src)
//package com.java2s; //License from project: Open Source License import java.security.*; public class Main { public static byte[] SHA1(byte[] src) { try {//from ww w. j a va2s .c o m MessageDigest crypt = MessageDigest.getInstance("SHA-1"); ; crypt.reset(); crypt.update(src); return crypt.digest(); } catch (NoSuchAlgorithmException e) { } return new byte[0]; } }