Android MD5 Encode MD5(String text)

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

Description

MD

License

Apache License

Declaration

public static byte[] MD5(String text) throws NoSuchAlgorithmException 

Method Source Code

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

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

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

        md.update(text.getBytes());/*w  ww .j ava2 s  .  c  o m*/

        return md.digest();
    }
}

Related

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