This commit is contained in:
Looly
2023-05-19 22:28:39 +08:00
parent 586b29f3d1
commit ea1c49a93b
23 changed files with 53 additions and 41 deletions

View File

@@ -174,7 +174,7 @@ public class KeyUtil {
}
if (null == password) {
password = RandomUtil.randomString(32).toCharArray();
password = RandomUtil.randomStringLower(32).toCharArray();
}
return generateKey(algorithm, SpecUtil.createPBEKeySpec(password));
}

View File

@@ -72,7 +72,7 @@ public class SpecUtil {
*/
public static PBEKeySpec createPBEKeySpec(char[] password) {
if (null == password) {
password = RandomUtil.randomString(32).toCharArray();
password = RandomUtil.randomStringLower(32).toCharArray();
}
return new PBEKeySpec(password);
}