mirror of
https://github.com/whvcse/EasyCaptcha.git
synced 2024-11-23 10:09:19 +08:00
feat: 设置自定义验证码,使用方来确保验证码的随机性,比如,使用方有一个需要需要根据用户的账号或者手机号随机几位来生成验证码,就可以通过该方法设置验证码,来实现该需求
This commit is contained in:
parent
9d75a7cce7
commit
503812e0e6
@ -308,4 +308,12 @@ public abstract class Captcha extends Randoms {
|
|||||||
public void setCharType(int charType) {
|
public void setCharType(int charType) {
|
||||||
this.charType = charType;
|
this.charType = charType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置自定义验证码,使用方来确保验证码的随机性,比如,使用方有一个需要需要根据用户的账号或者手机号随机几位来生成验证码,就可以通过该方法设置验证码,来实现该需求
|
||||||
|
* @param chars
|
||||||
|
*/
|
||||||
|
public void setChars(String chars) {
|
||||||
|
this.chars = chars;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user