| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
11年前发布

生成验证码的Java类库:Cage

Cage是一个用于生成验证码图的Java类库。它具有快速、小型和简单的特点。其目的是生成,易于人读取的图像,但对一台计算机不可能或至少是非常困难的读取。

生成验证码的Java类库:Cage 生成验证码的Java类库:Cage

特性

  • it is open source, Apache v2 licensed so it can be used in enterprise/proprietary projects too
  • it supports maven (available from the central maven repository)
  • it is fast (on the test pc 3-5 msec / image)
  • it is small (a single, small jar, no external dependencies, only Java 1.5 or newer is needed)
  • supports a wide variety of effects (symbol crowding, rotating, ripple - waving, outline shadowing and blurring)
  • has two predefined templates that mimics those captchas used by large email providers. See Templates for more info.
  • it is simple to use and integrate. See QuickStart for a fast start.

public class QuickStart {    public static void main(String[] args) throws IOException {      Cage cage = new GCage();        OutputStream os = new FileOutputStream("captcha.jpg", false);      try {        cage.draw(cage.getTokenGenerator().next(), os);      } finally {        os.close();      }    }  }

项目主页:http://www.open-open.com/lib/view/home/1397528578075

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1397528578075.html
Cage 验证码(Captcha)