package org.ros.chatto.captcha;

import java.awt.image.BufferedImage;

import lombok.Builder;

@Builder
public class WebCaptcha {
	private final CaptchaBehaviour captchaBehaviour;
	
	public BufferedImage generateCaptcha() {
		return captchaBehaviour.generateCaptcha();
	} 
	
	public BufferedImage generateCaptcha(String captchaText) {
		return captchaBehaviour.generateCaptcha(captchaText);
	} 
	
	public String getRandomChars() {
        return captchaBehaviour.getRandomChars();
    }

    public String getRandomChars(int quantity) {
    	return captchaBehaviour.getRandomChars(quantity);
    }
}

//		WebCaptcha webCaptcha = WebCaptcha.builder().captchaBehaviour(new SimpleCaptchaBehavior()).build();
//		webCaptcha.generateCaptcha();
//
//		// @formatter:off
//		webCaptcha = WebCaptcha.builder()
//				.captchaBehaviour(
//						ManualCaptchaBehaviour.builder()
//						.length(8)
//						.style("black")
//						.build()
//				).build();
//				
//		// @formatter:on
