Java SHA1 sha1Hash(byte[] data)

Here you can find the source of sha1Hash(byte[] data)

Description

sha Hash

License

Apache License

Declaration

public static byte[] sha1Hash(byte[] data) throws Exception 

Method Source Code


//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*/
}

Related

  1. sha1DigestAsHex(String data)
  2. sha1Encode(byte[] content)
  3. SHA1Encode(String sourceString)
  4. sha1Hash()
  5. sha1hash(byte[] blob)
  6. sha1hash(Collection nquads)
  7. sha1hash(File f)
  8. sha1Hash(File file)
  9. sha1Hash(final String tohash)