Java SHA1 sha1(String input)

Here you can find the source of sha1(String input)

Description

sha

License

Open Source License

Declaration

public static byte[] sha1(String input) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static byte[] sha1(String input) {
        try {/*from w  ww  .  j a  v a2  s.c o m*/
            MessageDigest mDigest = MessageDigest.getInstance("SHA1");
            return mDigest.digest(input.getBytes());
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. sha1(String input)
  2. sha1(String input)
  3. sha1(String input)
  4. sha1(String input)
  5. sha1(String input)
  6. sha1(String input)
  7. sha1(String input, String encoding)
  8. sha1(String message)
  9. sha1(String param)