Java SHA1 SHA1(byte[] src)

Here you can find the source of SHA1(byte[] src)

Description

SHA

License

Open Source License

Declaration

public static byte[] SHA1(byte[] src) 

Method Source Code

//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];
    }
}

Related

  1. SHA1(byte[] input)
  2. sha1(byte[] input)
  3. sha1(byte[] input)
  4. sha1(byte[] input)
  5. sha1(byte[] message)
  6. SHA1(ByteBuffer buf, int offset, int size)
  7. sha1(File f)
  8. sha1(File file)
  9. sha1(File file)