Java MD5 String md5(String text)

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

Description

md

License

Apache License

Declaration

public static String md5(String text) 

Method Source Code


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

import java.math.BigInteger;
import java.security.MessageDigest;

public class Main {
    private static MessageDigest md;

    public static String md5(String text) {
        byte[] bytes = md.digest(text.getBytes());
        BigInteger bi = new BigInteger(bytes);
        return bi.toString(16);
    }/* www.ja  v a2 s .  c  o m*/
}

Related

  1. MD5(String text)
  2. MD5(String text)
  3. md5(String text)
  4. md5(String text)
  5. MD5(String text)
  6. md5(String text)
  7. md5(String text)
  8. md5(String text, String charset)
  9. md5(String text, String key)