Java SHA1 SHA1(byte[] input)

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

Description

SHA

License

Open Source License

Declaration

public synchronized static byte[] SHA1(byte[] input) throws Exception 

Method Source Code

//package com.java2s;
/*//from www .  j  ava2  s . c om
JJSP - Java and Javascript Server Pages 
Copyright (C) 2016 Global Travel Ventures Ltd
    
This program is free software: you can redistribute it and/or modify 
it under the terms of the GNU General Public License as published by 
the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.
    
This program is distributed in the hope that it will be useful, but 
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
for more details.
    
You should have received a copy of the GNU General Public License along with 
this program. If not, see http://www.gnu.org/licenses/.
*/

import java.security.*;

public class Main {
    private static MessageDigest sha1;

    public synchronized static byte[] SHA1(byte[] input) throws Exception {
        return sha1.digest(input);
    }
}

Related

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