|
@@ -117,12 +117,12 @@ public class SecurityUtils {
|
|
|
* @return 加密字符串
|
|
|
*/
|
|
|
public static String encryptPassword(String password) {
|
|
|
- //密码强度校验
|
|
|
- Pattern p = Pattern.compile("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?!.*([a-zA-Z0-9])\\1{2}).{8,16}$");
|
|
|
- Matcher m = p.matcher(password);
|
|
|
- if(!m.find()){
|
|
|
- throw new ServiceException("密码需要包含 非连续的 大写英文字母 小写英文字母 数字");
|
|
|
- }
|
|
|
+// //密码强度校验
|
|
|
+// Pattern p = Pattern.compile("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?!.*([a-zA-Z0-9])\\1{2}).{8,16}$");
|
|
|
+// Matcher m = p.matcher(password);
|
|
|
+// if(!m.find()){
|
|
|
+// throw new ServiceException("密码需要包含 非连续的 大写英文字母 小写英文字母 数字");
|
|
|
+// }
|
|
|
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
|
|
return passwordEncoder.encode(password);
|
|
|
}
|