首页 > 代码库 > java MD5加密

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;
    }

 

java MD5加密