Here you can find the source of SHA_1(byte[] input)
static byte[] SHA_1(byte[] input)
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { static byte[] SHA_1(byte[] input) { try {//from w w w . j a v a 2 s. c o m MessageDigest sha_1 = MessageDigest.getInstance("SHA-1"); sha_1.update(input); return sha_1.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return null; } }