mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test and change AES costructor
This commit is contained in:
@@ -125,6 +125,21 @@ public class RandomUtil {
|
||||
return random;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取algorithms/providers中提供的强安全随机生成器<br>
|
||||
* 注意:此方法可能造成阻塞或性能问题
|
||||
*
|
||||
* @return {@link SecureRandom}
|
||||
* @since 5.7.12
|
||||
*/
|
||||
public static SecureRandom getSecureRandomStrong() {
|
||||
try {
|
||||
return SecureRandom.getInstanceStrong();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new UtilException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取随机数产生器
|
||||
*
|
||||
|
@@ -96,7 +96,7 @@ public class ReUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得匹配的字符串,,获得正则中分组1的内容
|
||||
* 获得匹配的字符串,获得正则中分组1的内容
|
||||
*
|
||||
* @param pattern 编译后的正则模式
|
||||
* @param content 被匹配的内容
|
||||
|
Reference in New Issue
Block a user