Commit eb9a8420 by guojuxing

自动生成length位中英文密码

parent 150a5d9b
package com.gic.enterprise.utils;
import com.gic.commons.util.Md5Util;
public class AutoCreatePasswordUtils {
/**
* 自动生成length位中英文密码
* @Title: autoCreatePassword

* @Description:

 * @author guojuxing
* @param length

* @return java.lang.String


 */
public static String autoCreatePassword(int length) {
String password = CreateRandomUtils.generateNumberStr(length);
return encryptPassword(password);
}
public static String encryptPassword(String password) {
Md5Util md5 = new Md5Util();
return md5.encrypt(password + password);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment