验证码生成器增加构造方法,可自定义随机数字符集

This commit is contained in:
Looly
2024-01-05 09:09:30 +08:00
parent 7d8c458d4d
commit 17d773181e
3 changed files with 4 additions and 1 deletions

View File

@@ -154,6 +154,7 @@ public class CaptchaUtil {
* @param width 宽
* @param height 高
* @param generator 验证码生成器
* @param thickness 验证码干扰元素个数
* @return {@link GifCaptcha}
*/
public static GifCaptcha createGifCaptcha(int width, int height, CodeGenerator generator, int thickness) {

View File

@@ -56,6 +56,7 @@ public class GifCaptcha extends AbstractCaptcha {
* @param width 验证码宽度
* @param height 验证码高度
* @param codeCount 验证码个数
* @param interfereCount 验证码干扰元素个数
*/
public GifCaptcha(int width, int height, int codeCount, int interfereCount) {
this(width, height, new RandomGenerator(codeCount), interfereCount);