java MD5加密

public String EncodingByMd5(String unencodingString) throws NoSuchAlgorithmException,UnsupportedEncodingException{
        MessageDigest md5=MessageDigest.getInstance("MD5");
        BASE64Encoder base64Encoder=new BASE64Encoder();
        String encodingString=base64Encoder.encode(md5.digest(unencodingString.getBytes("utf-8")));
        return encodingString;
    }

 

posted @ 2017-04-18 15:12  CMelody  阅读(164)  评论(0编辑  收藏  举报