package com.hxhq.gateway.service;

import java.io.IOException;
import com.hxhq.common.core.exception.CaptchaException;
import com.hxhq.common.core.web.domain.AjaxResult;

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

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