Package | Description |
---|---|
cn.hutool.captcha |
图片验证码实现
|
cn.hutool.captcha.generator |
验证码生成策略实现
|
Modifier and Type | Field and Description |
---|---|
protected CodeGenerator |
AbstractCaptcha.generator
验证码生成器
|
Modifier and Type | Method and Description |
---|---|
CodeGenerator |
AbstractCaptcha.getGenerator()
获取验证码生成器
|
Modifier and Type | Method and Description |
---|---|
static CircleCaptcha |
CaptchaUtil.createCircleCaptcha(int width,
int height,
CodeGenerator generator,
int circleCount)
创建圆圈干扰的验证码
|
static GifCaptcha |
CaptchaUtil.createGifCaptcha(int width,
int height,
CodeGenerator generator,
int thickness)
创建GIF验证码
|
static LineCaptcha |
CaptchaUtil.createLineCaptcha(int width,
int height,
CodeGenerator generator,
int lineCount)
创建线干扰的验证码
|
static ShearCaptcha |
CaptchaUtil.createShearCaptcha(int width,
int height,
CodeGenerator generator,
int thickness)
创建扭曲干扰的验证码,默认5位验证码
|
void |
AbstractCaptcha.setGenerator(CodeGenerator generator)
设置验证码生成器
|
Constructor and Description |
---|
AbstractCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
AbstractCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount,
float size)
构造
|
CircleCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
GifCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
LineCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
ShearCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractGenerator
随机字符验证码生成器
可以通过传入的基础集合和长度随机生成验证码字符 |
class |
MathGenerator
数字计算验证码生成器
|
class |
RandomGenerator
随机字符验证码生成器
可以通过传入的基础集合和长度随机生成验证码字符 |
Copyright © 2024. All rights reserved.