add test and change AES costructor

This commit is contained in:
Looly
2021-09-07 23:54:57 +08:00
parent c50a63a196
commit 4c237ba95e
6 changed files with 119 additions and 13 deletions

View File

@@ -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);
}
}
/**
* 获取随机数产生器
*

View File

@@ -96,7 +96,7 @@ public class ReUtil {
}
/**
* 获得匹配的字符串,获得正则中分组1的内容
* 获得匹配的字符串获得正则中分组1的内容
*
* @param pattern 编译后的正则模式
* @param content 被匹配的内容