Java Digest digest(String source)

Here you can find the source of digest(String source)

Description

digest

License

Apache License

Declaration

public static byte[] digest(String source) throws NoSuchAlgorithmException 

Method Source Code

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

import java.security.*;

public class Main {
    public static byte[] digest(String source) throws NoSuchAlgorithmException {
        MessageDigest md = MessageDigest.getInstance("SHA1");

        md.update(source.getBytes());/*from   w  w  w  . j  a  v a2s.  com*/

        return md.digest();
    }
}

Related

  1. digest(String plain, String algorithm)
  2. digest(String planeText)
  3. digest(String provider, File file, int radix)
  4. digest(String raw, String algorithm)
  5. digest(String s, String algorithm)
  6. digest(String source, byte[] salt)
  7. digest(String source, String algorythm)
  8. digest(String strSource)
  9. digest(String strSrc, String encName)