mirror of
https://gitee.com/dromara/hutool.git
synced 2025-10-27 11:19:22 +08:00
fix code
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user