Android SHA1 Hash Create SHA1(String text)

Here you can find the source of SHA1(String text)

Description

SHA

License

Apache License

Declaration

public static byte[] SHA1(String text) throws NoSuchAlgorithmException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Main {
    public static byte[] SHA1(String text) throws NoSuchAlgorithmException {
        MessageDigest md = MessageDigest.getInstance("SHA-1");

        md.update(text.getBytes());/*from w ww.  jav a  2 s. c  om*/

        return md.digest();
    }
}

Related

  1. SHA1(String str)
  2. sha512(String what_to_encode)
  3. SHA1(String text)
  4. dataDigest(String in)
  5. SHA1(String s)
  6. SHA256(String text)
  7. HashPassword(String text)
  8. sha1(File input)
  9. sha1(String input)