Android MD5 Encode 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 {// w w  w  .j av a  2 s.  c om
            java.security.MessageDigest md = java.security.MessageDigest
                    .getInstance("MD5");
            byte[] array = md.digest(md5.getBytes());
            StringBuilder sb = new StringBuilder();
            for (byte aByte : array) {
                sb.append(Integer.toHexString((aByte & 0xFF) | 0x100)
                        .substring(1, 3));
            }
            return sb.toString();
        } catch (java.security.NoSuchAlgorithmException ignored) {
        }
        return null;
    }
}

Related

  1. md5(final String s)
  2. hexMD5(String input)
  3. getMD5(String str)
  4. getMD5Digest(String str)
  5. computeMd5Hash(byte[] in)
  6. MD5(String text)
  7. md5(File input)
  8. md5(String input)
  9. md5(String ori)