先上代码:
package com.star.utils;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Created by hp on 2016/11/28.
*/
public class Md5Utils {
/**
* 使用Md5算法进行加密
*/
public static String md5(String plainText){
//定义一个字节数组,接收加密完成的密码
byte[] secretBytes=null;