Java SHA1 sha1Digest(String src)

Here you can find the source of sha1Digest(String src)

Description

sha Digest

License

Open Source License

Declaration

public static byte[] sha1Digest(String src) 

Method Source Code

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

import java.security.MessageDigest;

public class Main {
    public static byte[] sha1Digest(String src) {
        try {//from  ww w  . jav a 2s .  c  om
            MessageDigest md = MessageDigest.getInstance("SHA-1");
            return md.digest(src.getBytes("UTF8"));
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. sha1ByString(String str)
  2. SHA1Checksum(String filename)
  3. sha1Digest(byte[] bytes)
  4. sha1Digest(byte[] bytes)
  5. sha1Digest(final InputStream data)
  6. sha1DigestAsHex(String data)
  7. sha1Encode(byte[] content)
  8. SHA1Encode(String sourceString)
  9. sha1Hash()