Skip to content

Commit

Permalink
移除Util类中冗余的随机数生成器
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Feb 1, 2025
1 parent 9faaa41 commit b5859fa
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/cc/baka9/catseedlogin/util/Util.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package cc.baka9.catseedlogin.util;

import java.security.SecureRandom;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.regex.Pattern;
import org.apache.commons.lang3.RandomStringUtils;

public class Util {
private static final Pattern passwordDifficultyRegex = Pattern.compile("^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$");
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static final Random random = new SecureRandom();

public static boolean passwordIsDifficulty(String pwd) {
return !passwordDifficultyRegex.matcher(pwd).find();
}
Expand Down

0 comments on commit b5859fa

Please sign in to comment.