Here you can find the source of sha1(byte[] bytes)
Parameter | Description |
---|---|
bytes | a parameter |
@Deprecated public static byte[] sha1(byte[] bytes)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; public class Main { /**// ww w .j a v a 2 s . co m * returns a 20 byte sha1 hash * @param bytes * @return * @deprecated moved to HashFunctions */ @Deprecated public static byte[] sha1(byte[] bytes) { try { MessageDigest sha = MessageDigest.getInstance("SHA-1"); byte[] result = sha.digest(bytes); return result; } catch (Exception x) { } return null; } }