Android SHA1 Hash Create calculateSHA1(byte[] data)

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

Description

calculate SHA

Declaration

public static byte[] calculateSHA1(byte[] data) 

Method Source Code

//package com.java2s;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Main {
    public static byte[] calculateSHA1(byte[] data) {
        try {/*from ww  w .  j  a va  2  s.  c  om*/
            MessageDigest md = MessageDigest.getInstance("SHA1");
            return md.digest(data);
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. computeSHAHash(String password)
  2. getSHA1CertFingerprint(Context ctx)
  3. SHA1(String text)
  4. shaByte(String in)
  5. shaByte(byte[] in)
  6. sha1(byte[] bytesOfMessage)
  7. getCertificateSHA1(X509Certificate certificate)
  8. hmacSha1(byte[] value, byte[] key)
  9. computeSHAHash(String password)