Java MD5 String MD5(String md5)

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

Description

MD

License

Open Source License

Declaration

public static String MD5(String md5) 

Method Source Code

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

public class Main {
    public static String MD5(String md5) {
        try {/*  ww  w .j  av  a  2s  . c om*/
            java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
            byte[] array = md.digest(md5.getBytes());
            StringBuffer sb = new StringBuffer();
            for (int i = 0; i < array.length; ++i) {
                sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1, 3));
            }
            return sb.toString();
        } catch (java.security.NoSuchAlgorithmException e) {
        }
        return null;
    }
}

Related

  1. MD5(String inputString)
  2. md5(String inputText)
  3. md5(String inStr)
  4. md5(String key)
  5. md5(String md5)
  6. md5(String message)
  7. MD5(String message)
  8. MD5(String message)
  9. md5(String message)