Java Digest digest(String input, String algorithm, String encoding)

Here you can find the source of digest(String input, String algorithm, String encoding)

Description

digest

License

Open Source License

Declaration

private static byte[] digest(String input, String algorithm, String encoding) throws Exception 

Method Source Code


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

public class Main {

    private static byte[] digest(String input, String algorithm, String encoding) throws Exception {
        MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
        return messageDigest.digest(input.getBytes(encoding));
    }/*from  w w  w  .j a  va2  s .  c o  m*/
}

Related

  1. digest(String aValue)
  2. digest(String base)
  3. digest(String digest, byte[] data)
  4. digest(String ha1, String ha2, String nonce)
  5. digest(String input, Charset charset)
  6. digest(String key)
  7. digest(String message, byte[] salt)
  8. digest(String name, String source)
  9. digest(String orgin, String algorithm)