Package com.google.code.kaptcha.impl

Examples of com.google.code.kaptcha.impl.DefaultKaptcha


    private final int width;

    public KaptchaProducerImpl(Map<String, String> configuration)
    {
        producer = new DefaultKaptcha();

        Config config = new Config(toProperties(configuration));

        producer.setConfig(config);
View Full Code Here


    private final int width;

    public KaptchaProducerImpl(Map<String, String> configuration)
    {
        producer = new DefaultKaptcha();

        Config config = new Config(toProperties(configuration));

        producer.setConfig(config);
View Full Code Here

    return new CaptchaImageResource()
    {
      @Override
      protected byte[] render()
      {
        DefaultKaptcha kaptcha = new DefaultKaptcha();
        Properties properties = new Properties();
        kaptcha.setConfig(new Config(properties));
        randomText = Captcha.randomString(6, 8);
        BufferedImage image = kaptcha.createImage(randomText);
        return toImageData(image);
      }
    };
  }
View Full Code Here

      in.defaultReadObject();
      initKaptcha();
    }

    private void initKaptcha() {
      producer = new DefaultKaptcha();
      Config config = new Config(new Properties());
      producer.setConfig(config);
    }
View Full Code Here

        props.setProperty("kaptcha.textproducer.char.string", possibleSymbols);
        props.setProperty("kaptcha.textproducer.char.length", String.valueOf(length));
        props.setProperty("kaptcha.image.width", String.valueOf(width));
        props.setProperty("kaptcha.image.height", String.valueOf(height));
        Config conf = new Config(props);
        DefaultKaptcha captcha = new DefaultKaptcha();
        captcha.setConfig(conf);
        return captcha;
    }
View Full Code Here

TOP

Related Classes of com.google.code.kaptcha.impl.DefaultKaptcha

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.