package org.wfc.gateway.service;

import org.wfc.common.core.exception.CaptchaException;
import org.wfc.common.core.web.domain.AjaxResult;

import java.io.IOException;

/**
 * 验证码处理
 *
 * @author wfc
 */
public interface ValidateCodeService
{
    /**
     * 生成验证码
     */
    public AjaxResult createCaptcha() throws IOException, CaptchaException;

    /**
     * 生成验证码-邮件
     */
    public AjaxResult createCaptchaEmail(String email) throws IOException, CaptchaException;

    /**
     * 校验验证码
     */
    public void checkCaptcha(String key, String value) throws CaptchaException;

    /**
     * 校验邮箱验证码
     */
    public void checkCaptchaEmail(String key, String value) throws CaptchaException;
}
