Files
DataManagerSystem/src/backend/utils/interfaces/CaptchaUtils.java
2025-12-07 22:27:18 +08:00

42 lines
997 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package backend.utils.interfaces;
import java.util.Random;
/**
* 验证码工具类接口
* 提供验证码的生成和验证功能
*/
public interface CaptchaUtils {
/**
* 字符集常量,包含大小写字母和数字
*/
static final String CHAR_SET="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
/**
* 验证码长度常量默认为4位
*/
static final int CAPTCHA_LENGTH=4;
/**
* 私有构造函数,防止实例化
*/
//private CaptchaUtils();
/**
* 生成随机验证码
*
* @return 生成的验证码字符串
*/
//static String generateCaptcha();
/**
* 验证用户输入的验证码是否正确
*
* @param inputCaptcha 用户输入的验证码
* @param systemCaptcha 系统生成的验证码
* @return 验证结果正确返回true错误返回false
*/
//static boolean verifyCaptcha(String inputCaptcha,String systemCaptcha);
}