Navigation



PureCaptcha

PureCaptcha is a library I development in frustration due to the lack of decent and properly customizable CAPTCHA's for Java.

For a few years I had been using jCaptcha and while it worked without any problems it had few if any customization options and generated images that could be overly hard to read.

While looking for a replacement I found several other Java based CAPTCHA's but they all seemed to have different shortcomings so I decided to do something about it. I started with the kaptcha project and then rewrote most part of the code to create a new library that had simplicity of jCaptcha combined with the more modern features of kaptcha. I also added a better  and more flexible architecture that completely free from property files  and with the ability to chain multiple filters.

Here is a few sample images of the default configuration:

  

Here is a sample of how to use the utility classes that comes with PureCaptcha together with the with the Java Servlet API.

Creating a CaptchaHandler:

CaptchaHandler captchaHandler = new DefaultCaptchaHandler("myCaptcha", 120000, false);

Generating an image and sending it to the client:

captchaHandler.getCaptchaImage(req, res);

Verifying a submitted code:

String captchaCode = req.getParameter("captchaCode");

if (!captchaHandler.isValidCode(req, captchaCode)) {

    //Invalid captcha code submitted do something here to fight off the spammers invading the Internets!!!!!1
}

Releases

Version Release date Download Changelog
1.2.4 6/5 2015 PureCaptcha-1.2.4.jar (98 KB) Link
1.2.0 10/9 2014 PureCaptcha-1.2.0.jar (100 KB) Link
1.0.0 30/10 2012 PureCaptcha-1.0.0.jar (101 KB)  -

Depencies

PureCaptcha has the following dependencies:

Source code

The source code is copyright Robert Olofsson and various other committers. It is available under the LGPLv3 license from the following subversion repository: svn://svn.unlogic.se/purecaptcha

Attribution

The project is originally based on kaptcha which is licensed under the Apache License, Version 2.0. The original software and related information is available at:
http://code.google.com/p/kaptcha/

The Java Image Processing classes are provided by JH Labs under the Apache License, Version 2.0. The original software and related information is available at: http://jhlabs.com/ip/filters/download.html