Java MD5 String md5(String message)

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

Description

md

License

LGPL

Declaration

public static String md5(String message) 

Method Source Code

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

import java.io.UnsupportedEncodingException;

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

public class Main {
    public static String md5(String message) {
        try {//  w  ww .  ja  v  a2 s.  co  m
            MessageDigest md = MessageDigest.getInstance("MD5");
            return new String(md.digest(message.getBytes("CP1252")));
        } catch (NoSuchAlgorithmException e) {
        } catch (UnsupportedEncodingException e) {
        }
        return null;
    }
}

Related

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